Skip to content

Commit

Permalink
add: L2 page to test content
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbruce committed Dec 18, 2023
1 parent b224abb commit 5a6a563
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/SiteMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function can_skip_sitemap(): void

$expected = <<<xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.5</priority></url></urlset>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/l2-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.5</priority></url></urlset>
xml;

$result = (string) Sitemap::create(
Expand All @@ -50,7 +50,7 @@ public function can_change_default_priority(): void
{
$expected = <<<xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.75</priority></url></urlset>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/l2-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.75</priority></url></urlset>
xml;

$result = (string) Sitemap::create(
Expand All @@ -71,7 +71,7 @@ public function is_expected_xml(): void
{
$expected = <<<xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.5</priority></url></urlset>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://ex.ample/l1-page/l2-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/l1-page/</loc><lastmod>2023-01-01</lastmod><priority>1</priority></url><url><loc>http://ex.ample/</loc><priority>0.5</priority></url></urlset>
xml;

$result = (string) Sitemap::create(
Expand Down
5 changes: 5 additions & 0 deletions tests/test-content/public/l1-page/l2-page/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "L2 page",
"created": "20230101",
"priority": 1.0
}

0 comments on commit 5a6a563

Please sign in to comment.