Skip to content

Commit

Permalink
Test HtmlPages are added to the sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 18, 2022
1 parent d525f69 commit ca6ceda
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/framework/tests/Feature/Services/SitemapServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public function test_all_route_types_are_discovered()
$files = [
'_pages/blade.blade.php',
'_pages/markdown.md',
'_pages/html.html',
'_posts/post.md',
'_docs/doc.md',
];
Expand All @@ -143,12 +144,13 @@ public function test_all_route_types_are_discovered()
$service = new SitemapGenerator();
$service->generate();

$this->assertCount(4, $service->getXmlElement()->url);
$this->assertCount(5, $service->getXmlElement()->url);

$this->assertEquals('foo/blade.html', $service->getXmlElement()->url[0]->loc);
$this->assertEquals('foo/markdown.html', $service->getXmlElement()->url[1]->loc);
$this->assertEquals('foo/posts/post.html', $service->getXmlElement()->url[2]->loc);
$this->assertEquals('foo/docs/doc.html', $service->getXmlElement()->url[3]->loc);
$this->assertEquals('foo/html.html', $service->getXmlElement()->url[0]->loc);
$this->assertEquals('foo/blade.html', $service->getXmlElement()->url[1]->loc);
$this->assertEquals('foo/markdown.html', $service->getXmlElement()->url[2]->loc);
$this->assertEquals('foo/posts/post.html', $service->getXmlElement()->url[3]->loc);
$this->assertEquals('foo/docs/doc.html', $service->getXmlElement()->url[4]->loc);

Hyde::unlink($files);

Expand Down

0 comments on commit ca6ceda

Please sign in to comment.