| Total Complexity | 1 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class BreadcrumbsTest extends TestCase |
||
| 15 | { |
||
| 16 | public function testRender(): void |
||
| 17 | { |
||
| 18 | Breadcrumbs::counter(0); |
||
| 19 | |||
| 20 | $html = Breadcrumbs::widget() |
||
| 21 | ->homeLink(['label' => 'Home', 'url' => '#']) |
||
| 22 | ->links([ |
||
| 23 | ['label' => 'Library', 'url' => '#'], |
||
| 24 | ['label' => 'Data'] |
||
| 25 | ]) |
||
| 26 | ->render(); |
||
| 27 | |||
| 28 | $expected = <<<HTML |
||
| 29 | <nav aria-label="breadcrumb"><ol id="w0-breadcrumb" class="breadcrumb"><li class="breadcrumb-item"><a href="#">Home</a></li> |
||
| 30 | <li class="breadcrumb-item"><a href="#">Library</a></li> |
||
| 31 | <li class="breadcrumb-item active" aria-current="page">Data</li> |
||
| 32 | </ol></nav> |
||
| 33 | HTML; |
||
| 34 | |||
| 35 | |||
| 36 | $this->assertEqualsWithoutLE($expected, $html); |
||
| 37 | } |
||
| 39 |