Code Duplication    Length = 12-14 lines in 2 locations

tests/TocifierTest.php 2 locations

@@ 42-53 (lines=12) @@
39
        $this->assertStringEqualsFile(__DIR__ . '/html2', $tocifier->getHtml());
40
    }
41
42
    public function testTOC()
43
    {
44
        $tocifier = new Tocifier(file_get_contents(__DIR__ . '/test1'));
45
        $this->assertEquals($tocifier->getTOC(), array());
46
        $this->assertTrue($tocifier->process());
47
        $this->assertNotNull($tocifier->getTOC());
48
49
        ob_start();
50
        $tocifier->dumpTOC();
51
        $returned = ob_get_clean();
52
        $this->assertStringEqualsFile(__DIR__ . '/toc1', $returned);
53
    }
54
55
    public function testDataHideFromTOC()
56
    {
@@ 55-68 (lines=14) @@
52
        $this->assertStringEqualsFile(__DIR__ . '/toc1', $returned);
53
    }
54
55
    public function testDataHideFromTOC()
56
    {
57
        $tocifier = new Tocifier(file_get_contents(__DIR__ . '/test2'));
58
        $this->assertEquals($tocifier->getHtml(), '');
59
        $this->assertTrue($tocifier->process());
60
61
        // Check the augmented HTML is equal to the original one
62
        $this->assertStringEqualsFile(__DIR__ . '/test2', $tocifier->getHtml());
63
64
        ob_start();
65
        $tocifier->dumpTOC();
66
        $returned = ob_get_clean();
67
        $this->assertEquals("\n", $returned);
68
    }
69
}
70