Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testCanGenerateTableOfContents() |
||
14 | { |
||
15 | $markdown = "# Level 1\n## Level 2\n## Level 2B\n### Level 3\n"; |
||
16 | $result = (new GeneratesSidebarTableOfContents($markdown))->execute(); |
||
17 | |||
18 | $this->assertIsString($result); |
||
19 | $this->assertStringContainsString('<ul>', $result); |
||
20 | $this->assertStringContainsString('<a href="#level-2">Level 2</a>', $result); |
||
21 | $this->assertStringNotContainsString('[[END_TOC]]', $result); |
||
22 | } |
||
32 |