File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1717 $ this ->app = $ app ;
1818});
1919
20- test ('StaticBuilder builds paginated index page ' , function () {
20+ test ('StaticBuilder builds paginated index page with content listing ' , function () {
2121 /** @var StaticBuilder $builder */
2222 $ builder = $ this ->app ->builder ;
2323 $ builder ->buildPaginatedIndex ();
2424 expect (is_file ($ builder ->outputPath . '/index.html ' ))->toBeTrue ()
2525 ->and (is_dir ($ builder ->outputPath . '/page ' ))->toBeTrue ();
26+
27+ $ content = file_get_contents ($ builder ->outputPath . '/index.html ' );
28+ expect ($ content )->toMatch ("/template listing/ " );
2629});
2730
28- test ('StaticBuilder builds paginated content types pages ' , function () {
31+ test ('StaticBuilder builds paginated content types pages and single pages ' , function () {
2932 /** @var StaticBuilder $builder */
3033 $ builder = $ this ->app ->builder ;
3134 $ builder ->buildContentType ('posts ' );
3235 expect (is_file ($ builder ->outputPath . '/posts/index.html ' ))->toBeTrue ()
3336 ->and (is_file ($ builder ->outputPath . '/posts/test0/index.html ' ))->toBeTrue ()
3437 ->and (is_dir ($ builder ->outputPath . '/posts/page ' ))->toBeTrue ();
38+
39+ $ content = file_get_contents ($ builder ->outputPath . '/posts/test0/index.html ' );
40+ expect ($ content )->toMatch ("/template single/ " );
3541});
3642
3743test ('StaticBuilder builds custom index page ' , function () {
6470 $ builder ->cleanUp ();
6571 expect (is_file ($ builder ->outputPath . '/index.html ' ))->toBeFalse ();
6672});
73+
You can’t perform that action at this time.
0 commit comments