bytic /
navigation
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ByTIC\Navigation\Tests\Breadcrumbs; |
||
| 4 | |||
| 5 | use ByTIC\Navigation\Breadcrumbs\Trail; |
||
| 6 | use ByTIC\Navigation\Tests\AbstractTest; |
||
| 7 | |||
| 8 | /** |
||
| 9 | * Class TrailTest |
||
| 10 | * @package ByTIC\Navigation\Tests\Breadcrumbs |
||
| 11 | */ |
||
| 12 | class TrailTest extends AbstractTest |
||
| 13 | { |
||
| 14 | public function test_render_emptyBreadcrumbs() |
||
| 15 | { |
||
| 16 | $trail = new Trail(); |
||
| 17 | |||
| 18 | $content = $trail->render(); |
||
| 19 | self::assertEmpty($content); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function test_render() |
||
| 23 | { |
||
| 24 | $trail = new Trail(); |
||
| 25 | $trail->addItem('t1', '#'); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 26 | $trail->addItem('t2', '#'); |
||
| 27 | |||
| 28 | $content = $trail->render(); |
||
| 29 | $testContent = file_get_contents(TEST_FIXTURE_PATH . '/views-rendered/breadcrumbs/basic-bootstrap4.html'); |
||
| 30 | self::assertSame($testContent, $content); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |