|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | it('loads index page', function () { |
4 | | - $app = getLibrarianIndex(); |
| 4 | + $app = getLibrarian('/'); |
5 | 5 | $app->runCommand(['minicli', 'web', 'index']); |
6 | 6 | })->expectOutputRegex('/template listing/'); |
7 | 7 |
|
8 | 8 | it('loads custom index page', function () { |
9 | | - $app = getLibrarianIndex('posts/test0'); |
| 9 | + $app = getLibrarian('/', [], ['site_index' => 'posts/test0']); |
| 10 | + $app->runCommand(['minicli', 'web', 'index']); |
| 11 | +})->expectOutputRegex('/Devo Produzir Conteúdo em Português ou Inglês?/'); |
| 12 | + |
| 13 | +it('loads custom index template', function () { |
| 14 | + $app = getLibrarian('/', [], ['site_index' => 'posts/test0', 'site_index_tpl' => 'content/custom_index.html.twig']); |
10 | 15 | $app->runCommand(['minicli', 'web', 'index']); |
11 | 16 | })->expectOutputRegex('/custom index/'); |
12 | 17 |
|
13 | | -it('loads ', function () { |
14 | | - $app = getLibrarianContent('test0'); |
| 18 | +it('loads single post', function () { |
| 19 | + $app = getLibrarian('/posts/test1'); |
| 20 | + $app->runCommand(['minicli', 'web', 'content']); |
| 21 | +})->expectOutputRegex('/Testing Markdown Front Matter/'); |
| 22 | + |
| 23 | +it('loads nested content', function () { |
| 24 | + $app = getLibrarian('/docs/en/test0'); |
| 25 | + $app->runCommand(['minicli', 'web', 'content']); |
| 26 | +})->expectOutputRegex('/Testing Sub-Level En/'); |
| 27 | + |
| 28 | +it('loads article list from base content type', function () { |
| 29 | + $app = getLibrarian('/posts'); |
15 | 30 | $app->runCommand(['minicli', 'web', 'content']); |
16 | | -})->expectOutputRegex('/template single/'); |
| 31 | +})->expectOutputRegex('/template listing Blog posts/'); |
17 | 32 |
|
18 | | -test('Content page posts/test1 is correctly loaded', function () { |
19 | | - $app = getLibrarianContent('test1'); |
| 33 | +it('loads article list from nested content type', function () { |
| 34 | + $app = getLibrarian('/docs/en'); |
20 | 35 | $app->runCommand(['minicli', 'web', 'content']); |
21 | | -})->expectOutputRegex('/template single/'); |
| 36 | +})->expectOutputRegex('/template listing English Docs/'); |
22 | 37 |
|
23 | | -test('Content page posts/test2 is correctly loaded', function () { |
24 | | - $app = getLibrarianContent('test2'); |
| 38 | +it('loads article list from parent content type', function () { |
| 39 | + $app = getLibrarian('/docs/'); |
25 | 40 | $app->runCommand(['minicli', 'web', 'content']); |
26 | | -})->expectOutputRegex('/template single/'); |
| 41 | +})->expectOutputRegex('/template listing Docs/'); |
0 commit comments