From 7556d50b6948fdd79791b34fcbc4f893c9a647fd Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 5 Sep 2023 18:56:09 -0400 Subject: [PATCH 1/2] Fix `lastmod` tests --- tests/ImageTest.php | 1 - tests/UrlTest.php | 8 -------- tests/VideoTest.php | 1 - ...url_object_cannot_be_added_twice_to_the_sitemap__1.xml | 1 - ...st__an_url_cannot_be_added_twice_to_the_sitemap__1.xml | 1 - ...Test__an_url_object_can_be_added_to_the_sitemap__1.xml | 1 - ...Test__an_url_string_can_be_added_to_the_sitemap__1.xml | 1 - ...l_with_an_alternate_can_be_added_to_the_sitemap__1.xml | 1 - ...mapTest__multiple_urls_can_be_added_in_one_call__1.xml | 2 -- ...Test__multiple_urls_can_be_added_to_the_sitemap__1.xml | 2 -- .../SitemapTest__sitemapable_object_can_be_added__1.xml | 4 ---- .../SitemapTest__sitemapable_objects_can_be_added__1.xml | 3 --- 12 files changed, 26 deletions(-) diff --git a/tests/ImageTest.php b/tests/ImageTest.php index c8f5ebd..9a8f7fa 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -8,7 +8,6 @@ https://localhost - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/UrlTest.php b/tests/UrlTest.php index d1ec5a3..8b422e1 100755 --- a/tests/UrlTest.php +++ b/tests/UrlTest.php @@ -18,14 +18,6 @@ expect($url->url)->toEqual('testUrl'); }); -it( - 'will use the current date time as the default for last modification date', - function () { - expect($this->url->lastModificationDate->toAtomString()) - ->toEqual($this->now->toAtomString()); - } -); - test('url can be set', function () { $url = Url::create('defaultUrl'); diff --git a/tests/VideoTest.php b/tests/VideoTest.php index 551d575..584d4e7 100644 --- a/tests/VideoTest.php +++ b/tests/VideoTest.php @@ -9,7 +9,6 @@ https://example.com - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__a_url_object_cannot_be_added_twice_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__a_url_object_cannot_be_added_twice_to_the_sitemap__1.xml index 4dcf065..bf0c741 100644 --- a/tests/__snapshots__/SitemapTest__a_url_object_cannot_be_added_twice_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__a_url_object_cannot_be_added_twice_to_the_sitemap__1.xml @@ -2,7 +2,6 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__an_url_cannot_be_added_twice_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__an_url_cannot_be_added_twice_to_the_sitemap__1.xml index 4dcf065..bf0c741 100644 --- a/tests/__snapshots__/SitemapTest__an_url_cannot_be_added_twice_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__an_url_cannot_be_added_twice_to_the_sitemap__1.xml @@ -2,7 +2,6 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__an_url_object_can_be_added_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__an_url_object_can_be_added_to_the_sitemap__1.xml index 4dcf065..bf0c741 100644 --- a/tests/__snapshots__/SitemapTest__an_url_object_can_be_added_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__an_url_object_can_be_added_to_the_sitemap__1.xml @@ -2,7 +2,6 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__an_url_string_can_be_added_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__an_url_string_can_be_added_to_the_sitemap__1.xml index 4dcf065..bf0c741 100644 --- a/tests/__snapshots__/SitemapTest__an_url_string_can_be_added_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__an_url_string_can_be_added_to_the_sitemap__1.xml @@ -2,7 +2,6 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__an_url_with_an_alternate_can_be_added_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__an_url_with_an_alternate_can_be_added_to_the_sitemap__1.xml index bf0c160..e098b4e 100644 --- a/tests/__snapshots__/SitemapTest__an_url_with_an_alternate_can_be_added_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__an_url_with_an_alternate_can_be_added_to_the_sitemap__1.xml @@ -4,7 +4,6 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_in_one_call__1.xml b/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_in_one_call__1.xml index 0be3f51..4a49675 100644 --- a/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_in_one_call__1.xml +++ b/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_in_one_call__1.xml @@ -2,13 +2,11 @@ http://localhost - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_to_the_sitemap__1.xml b/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_to_the_sitemap__1.xml index c32cdb2..94a984d 100644 --- a/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_to_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapTest__multiple_urls_can_be_added_to_the_sitemap__1.xml @@ -2,13 +2,11 @@ http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/contact - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__sitemapable_object_can_be_added__1.xml b/tests/__snapshots__/SitemapTest__sitemapable_object_can_be_added__1.xml index 3b620a9..6318270 100644 --- a/tests/__snapshots__/SitemapTest__sitemapable_object_can_be_added__1.xml +++ b/tests/__snapshots__/SitemapTest__sitemapable_object_can_be_added__1.xml @@ -2,25 +2,21 @@ http://localhost - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/home - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/blog/post-1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/blog/post-2 - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapTest__sitemapable_objects_can_be_added__1.xml b/tests/__snapshots__/SitemapTest__sitemapable_objects_can_be_added__1.xml index 9d965ad..3f2a42d 100644 --- a/tests/__snapshots__/SitemapTest__sitemapable_objects_can_be_added__1.xml +++ b/tests/__snapshots__/SitemapTest__sitemapable_objects_can_be_added__1.xml @@ -2,19 +2,16 @@ http://localhost/blog/post-1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/blog/post-2 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost/blog/post-3 - 2016-01-01T00:00:00+00:00 daily 0.8 From d83bacb7ee314ab1364d995ca6492c9f73d296e6 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 6 Sep 2023 10:04:16 -0400 Subject: [PATCH 2/2] Fix generator tests --- .../SitemapGeneratorTest__it_can_generate_a_sitemap__1.xml | 6 ------ ...odify_the_attributes_while_generating_the_sitemap__1.xml | 6 ------ ...SitemapGeneratorTest__it_can_use_a_custom_profile__1.xml | 1 - ...to_the_sitemap_if_hasCrawled()_does_not_return_it__1.xml | 5 ----- ...l_not_crawl_an_url_of_shouldCrawl()_returns_false__1.xml | 4 ---- 5 files changed, 22 deletions(-) diff --git a/tests/__snapshots__/SitemapGeneratorTest__it_can_generate_a_sitemap__1.xml b/tests/__snapshots__/SitemapGeneratorTest__it_can_generate_a_sitemap__1.xml index ffe7337..4f3bcf6 100644 --- a/tests/__snapshots__/SitemapGeneratorTest__it_can_generate_a_sitemap__1.xml +++ b/tests/__snapshots__/SitemapGeneratorTest__it_can_generate_a_sitemap__1.xml @@ -2,37 +2,31 @@ http://localhost:4020/ - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page2 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page3 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page4 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page5 - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapGeneratorTest__it_can_modify_the_attributes_while_generating_the_sitemap__1.xml b/tests/__snapshots__/SitemapGeneratorTest__it_can_modify_the_attributes_while_generating_the_sitemap__1.xml index c7063dd..0ab1821 100644 --- a/tests/__snapshots__/SitemapGeneratorTest__it_can_modify_the_attributes_while_generating_the_sitemap__1.xml +++ b/tests/__snapshots__/SitemapGeneratorTest__it_can_modify_the_attributes_while_generating_the_sitemap__1.xml @@ -2,37 +2,31 @@ http://localhost:4020/ - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page2 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page3 - 2016-01-01T00:00:00+00:00 daily 0.6 http://localhost:4020/page4 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page5 - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapGeneratorTest__it_can_use_a_custom_profile__1.xml b/tests/__snapshots__/SitemapGeneratorTest__it_can_use_a_custom_profile__1.xml index 1b6f9eb..80a90c3 100644 --- a/tests/__snapshots__/SitemapGeneratorTest__it_can_use_a_custom_profile__1.xml +++ b/tests/__snapshots__/SitemapGeneratorTest__it_can_use_a_custom_profile__1.xml @@ -2,7 +2,6 @@ http://localhost:4020/ - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapGeneratorTest__it_will_not_add_the_url_to_the_sitemap_if_hasCrawled()_does_not_return_it__1.xml b/tests/__snapshots__/SitemapGeneratorTest__it_will_not_add_the_url_to_the_sitemap_if_hasCrawled()_does_not_return_it__1.xml index 14dde5b..38da080 100644 --- a/tests/__snapshots__/SitemapGeneratorTest__it_will_not_add_the_url_to_the_sitemap_if_hasCrawled()_does_not_return_it__1.xml +++ b/tests/__snapshots__/SitemapGeneratorTest__it_will_not_add_the_url_to_the_sitemap_if_hasCrawled()_does_not_return_it__1.xml @@ -2,31 +2,26 @@ http://localhost:4020/ - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page2 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page4 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page5 - 2016-01-01T00:00:00+00:00 daily 0.8 diff --git a/tests/__snapshots__/SitemapGeneratorTest__it_will_not_crawl_an_url_of_shouldCrawl()_returns_false__1.xml b/tests/__snapshots__/SitemapGeneratorTest__it_will_not_crawl_an_url_of_shouldCrawl()_returns_false__1.xml index b7ccb52..ae4222f 100644 --- a/tests/__snapshots__/SitemapGeneratorTest__it_will_not_crawl_an_url_of_shouldCrawl()_returns_false__1.xml +++ b/tests/__snapshots__/SitemapGeneratorTest__it_will_not_crawl_an_url_of_shouldCrawl()_returns_false__1.xml @@ -2,25 +2,21 @@ http://localhost:4020/ - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page1 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page2 - 2016-01-01T00:00:00+00:00 daily 0.8 http://localhost:4020/page4 - 2016-01-01T00:00:00+00:00 daily 0.8