File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/framework/tests/Feature/Commands Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,12 @@ public function testSitemapIsGeneratedWhenConditionsAreMet()
2121
2222 $ this ->assertFileDoesNotExist (Hyde::path ('_site/sitemap.xml ' ));
2323
24- $ this ->artisan ('build:sitemap ' )->assertExitCode (0 );
24+ $ this ->artisan ('build:sitemap ' )
25+ ->expectsOutputToContain ('Generating sitemap... ' )
26+ ->doesntExpectOutputToContain ('Skipped ' )
27+ ->expectsOutputToContain (' > Created _site/sitemap.xml ' )
28+ ->assertExitCode (0 );
29+
2530 $ this ->assertFileExists (Hyde::path ('_site/sitemap.xml ' ));
2631
2732 Filesystem::unlink ('_site/sitemap.xml ' );
@@ -33,7 +38,12 @@ public function testSitemapIsNotGeneratedWhenConditionsAreNotMet()
3338
3439 $ this ->assertFileDoesNotExist (Hyde::path ('_site/sitemap.xml ' ));
3540
36- $ this ->artisan ('build:sitemap ' )->assertExitCode (0 );
41+ $ this ->artisan ('build:sitemap ' )
42+ ->expectsOutputToContain ('Generating sitemap... ' )
43+ ->expectsOutputToContain ('Skipped ' )
44+ ->expectsOutput (' > Cannot generate sitemap without a valid base URL ' )
45+ ->assertExitCode (0 );
46+
3747 $ this ->assertFileDoesNotExist (Hyde::path ('_site/sitemap.xml ' ));
3848 }
3949}
You can’t perform that action at this time.
0 commit comments