diff --git a/tests/FileSystem/Directories/PublicDirectoryTest.php b/tests/FileSystem/Directories/PublicDirectoryTest.php index 65e1953..12f9504 100644 --- a/tests/FileSystem/Directories/PublicDirectoryTest.php +++ b/tests/FileSystem/Directories/PublicDirectoryTest.php @@ -16,12 +16,12 @@ class PublicDirectoryTest extends BaseTestCase */ public function is_expected_qualified_path(): void { - $expected = (new SplFileInfo(parent::PUBLIC_BASE . '/deeper-page')) + $expected = (new SplFileInfo(parent::PUBLIC_BASE . '/l1-page')) ->getRealPath(); $sut = PublicDirectory::inRoot( parent::root(), - '/deeper-page' + '/l1-page' ); $result = $sut->toString(); @@ -40,7 +40,7 @@ public function can_check_existence(): void { $sut = PublicDirectory::inRoot( parent::root(), - '/deeper-page' + '/l1-page' ); $this->assertNotNull( diff --git a/tests/FileSystem/Files/PublicContentFileTest.php b/tests/FileSystem/Files/PublicContentFileTest.php index 6164285..279937e 100644 --- a/tests/FileSystem/Files/PublicContentFileTest.php +++ b/tests/FileSystem/Files/PublicContentFileTest.php @@ -42,7 +42,7 @@ public function can_check_existence(): void $result ); - $sut = PublicContentFile::inRoot($root, '/deeper-page'); + $sut = PublicContentFile::inRoot($root, '/l1-page'); $this->assertNotNull( $sut diff --git a/tests/FileSystem/Files/PublicFileTest.php b/tests/FileSystem/Files/PublicFileTest.php index 69c17c0..8f07ef3 100644 --- a/tests/FileSystem/Files/PublicFileTest.php +++ b/tests/FileSystem/Files/PublicFileTest.php @@ -42,7 +42,7 @@ public function can_check_existence(): void $result ); - $sut = PublicFile::inRoot($root, 'meta.json', '/deeper-page'); + $sut = PublicFile::inRoot($root, 'meta.json', '/l1-page'); $this->assertNotNull( $sut diff --git a/tests/ObjectsFromJson/PublicMetaTest.php b/tests/ObjectsFromJson/PublicMetaTest.php index 32c0a75..c23eabd 100644 --- a/tests/ObjectsFromJson/PublicMetaTest.php +++ b/tests/ObjectsFromJson/PublicMetaTest.php @@ -25,7 +25,7 @@ public function can_get_content(): void $result ); - $sut = PublicMeta::inRoot(parent::root(), '/deeper-page'); + $sut = PublicMeta::inRoot(parent::root(), '/l1-page'); $expected = 1.0; @@ -36,7 +36,7 @@ public function can_get_content(): void $result ); - $sut = PublicMeta::inRoot(parent::root(), '/deeper-page'); + $sut = PublicMeta::inRoot(parent::root(), '/l1-page'); $result = $sut->nonexistent(); diff --git a/tests/PlainText/PrivateJsonTest.php b/tests/PlainText/PrivateJsonTest.php index 382defe..e776534 100644 --- a/tests/PlainText/PrivateJsonTest.php +++ b/tests/PlainText/PrivateJsonTest.php @@ -48,7 +48,7 @@ public function can_get_content(): void $expected = ''; - $sut = PrivateJson::inRoot(parent::root(), '/deeper-page'); + $sut = PrivateJson::inRoot(parent::root(), '/l1-page'); $result = $sut->toString(); diff --git a/tests/PlainText/PublicContentTest.php b/tests/PlainText/PublicContentTest.php index 61d5d7a..3029cc6 100644 --- a/tests/PlainText/PublicContentTest.php +++ b/tests/PlainText/PublicContentTest.php @@ -30,7 +30,7 @@ public function can_get_content(): void $expected = ''; - $sut = PublicContent::inRoot(parent::root(), '/deeper-page'); + $sut = PublicContent::inRoot(parent::root(), '/l1-page'); $result = $sut->toString(); diff --git a/tests/PlainText/PublicJsonTest.php b/tests/PlainText/PublicJsonTest.php index c9dde0d..1575b58 100644 --- a/tests/PlainText/PublicJsonTest.php +++ b/tests/PlainText/PublicJsonTest.php @@ -43,7 +43,7 @@ public function can_get_content(): void $expected = ''; - $sut = PublicJson::inRoot(parent::root(), '/deeper-page'); + $sut = PublicJson::inRoot(parent::root(), '/l1-page'); $result = $sut->toString(); diff --git a/tests/PlainText/PublicMetaTest.php b/tests/PlainText/PublicMetaTest.php index af47ccd..ab32c3c 100644 --- a/tests/PlainText/PublicMetaTest.php +++ b/tests/PlainText/PublicMetaTest.php @@ -32,14 +32,14 @@ public function can_get_content(): void $expected = <<toString(); diff --git a/tests/SiteMapTest.php b/tests/SiteMapTest.php index 5db7f16..30ee8c2 100644 --- a/tests/SiteMapTest.php +++ b/tests/SiteMapTest.php @@ -16,6 +16,7 @@ class SiteMapTest extends TestCase private function allPublicMetaFiles(): Traversable { return (new SymfonyFinder())->files()->name('meta.json') + ->sortByName(true) ->in( parent::publicRoot()->toString() ); @@ -29,7 +30,7 @@ public function can_skip_sitemap(): void $expected = << - http://ex.ample/deeper-page/2023-01-011http://ex.ample/0.5 + http://ex.ample/l1-page/l2-page/2023-01-011http://ex.ample/l1-page/2023-01-011http://ex.ample/0.5 xml; $result = (string) Sitemap::create( @@ -50,7 +51,7 @@ public function can_change_default_priority(): void { $expected = << - http://ex.ample/deeper-page/2023-01-011http://ex.ample/0.75 + http://ex.ample/l1-page/l2-page/2023-01-011http://ex.ample/l1-page/2023-01-011http://ex.ample/0.75 xml; $result = (string) Sitemap::create( @@ -71,7 +72,7 @@ public function is_expected_xml(): void { $expected = << - http://ex.ample/deeper-page/2023-01-011http://ex.ample/0.5 + http://ex.ample/l1-page/l2-page/2023-01-011http://ex.ample/l1-page/2023-01-011http://ex.ample/0.5 xml; $result = (string) Sitemap::create( diff --git a/tests/SiteTest.php b/tests/SiteTest.php index d39dd65..94d7f31 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -37,11 +37,11 @@ public function has_public_content(): void public function has_titles(): void { $expected = [ - 'Deeper page', + 'L1 page', 'Root test content' ]; - $result = $this->site()->titles('/deeper-page'); + $result = $this->site()->titles('/l1-page'); $this->assertSame( $expected, diff --git a/tests/test-content/public/deeper-page/meta.json b/tests/test-content/public/l1-page/l2-page/meta.json similarity index 64% rename from tests/test-content/public/deeper-page/meta.json rename to tests/test-content/public/l1-page/l2-page/meta.json index 82c1a0c..9f90a39 100644 --- a/tests/test-content/public/deeper-page/meta.json +++ b/tests/test-content/public/l1-page/l2-page/meta.json @@ -1,5 +1,5 @@ { - "title": "Deeper page", + "title": "L2 page", "created": "20230101", "priority": 1.0 } diff --git a/tests/test-content/public/l1-page/meta.json b/tests/test-content/public/l1-page/meta.json new file mode 100644 index 0000000..0dc1db6 --- /dev/null +++ b/tests/test-content/public/l1-page/meta.json @@ -0,0 +1,5 @@ +{ + "title": "L1 page", + "created": "20230101", + "priority": 1.0 +}