From 76205c603c7a43b3e08b1962eacb83d595cfad1f Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Sun, 6 Apr 2014 01:10:04 +0700 Subject: [PATCH] Update TOC tests --- tests/PhpWord/Tests/TOCTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/PhpWord/Tests/TOCTest.php b/tests/PhpWord/Tests/TOCTest.php index 8234a20f..a41f3a8d 100644 --- a/tests/PhpWord/Tests/TOCTest.php +++ b/tests/PhpWord/Tests/TOCTest.php @@ -64,15 +64,16 @@ class TOCTest extends \PHPUnit_Framework_TestCase 'Heading 2' => 2, 'Heading 3' => 3, ); + $toc = new TOC(); foreach ($titles as $text => $depth) { - $response = TOC::addTitle($text, $depth); + $response = $toc->addTitle($text, $depth); } $this->assertEquals($anchor, $response[0]); $this->assertEquals($bookmark, $response[1]); $i = 0; - $savedTitles = TOC::getTitles(); + $savedTitles = $toc->getTitles(); foreach ($titles as $text => $depth) { $this->assertEquals($text, $savedTitles[$i]['text']); $this->assertEquals($depth, $savedTitles[$i]['depth']);