Code Duplication    Length = 12-14 lines in 2 locations

tests/TocifierTest.php 2 locations

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