Add breadcrumbs function, docs and tests
This commit is contained in:
parent
4448798bf5
commit
2bdb432a9f
12 changed files with 451 additions and 0 deletions
21
devel/tests/helpers/build_breadcrumbs_empty_path.phpt
Normal file
21
devel/tests/helpers/build_breadcrumbs_empty_path.phpt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--TEST--
|
||||
buildBreadcrumbs: returns empty array for empty request path (frontpage)
|
||||
--FILE--
|
||||
<?php
|
||||
require '/var/www/app/context.php';
|
||||
require '/var/www/app/hooks.php';
|
||||
require '/var/www/app/constants.php';
|
||||
require '/var/www/app/helpers.php';
|
||||
|
||||
$ctx = new Context(
|
||||
contentDir: '/tmp/test_content',
|
||||
templates: new Templates('/tmp/base.php', '/tmp/page.php', '/tmp/list.php'),
|
||||
requestPath: '',
|
||||
hasTrailingSlash: false
|
||||
);
|
||||
|
||||
$result = buildBreadcrumbs($ctx);
|
||||
echo count($result) . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue