Skip to content

Commit 76205c6

Browse files
committed
Update TOC tests
1 parent 14664d3 commit 76205c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/PhpWord/Tests/TOCTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ public function testAddAndGetTitle()
6464
'Heading 2' => 2,
6565
'Heading 3' => 3,
6666
);
67+
$toc = new TOC();
6768

6869
foreach ($titles as $text => $depth) {
69-
$response = TOC::addTitle($text, $depth);
70+
$response = $toc->addTitle($text, $depth);
7071
}
7172
$this->assertEquals($anchor, $response[0]);
7273
$this->assertEquals($bookmark, $response[1]);
7374

7475
$i = 0;
75-
$savedTitles = TOC::getTitles();
76+
$savedTitles = $toc->getTitles();
7677
foreach ($titles as $text => $depth) {
7778
$this->assertEquals($text, $savedTitles[$i]['text']);
7879
$this->assertEquals($depth, $savedTitles[$i]['depth']);

0 commit comments

Comments
 (0)