From 7428b824250337f7c2260db1af22628fc7ae8770 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 22 Dec 2025 10:26:13 +0100 Subject: [PATCH] Update tests Looks like liberation.fr is now blocking wallabag. --- tests/Controller/EntryControllerTest.php | 12 +++++++----- tests/Controller/Import/InstapaperControllerTest.php | 8 ++++---- tests/fixtures/Import/instapaper-export.csv | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/Controller/EntryControllerTest.php b/tests/Controller/EntryControllerTest.php index d4fd1d376..05eca66e0 100644 --- a/tests/Controller/EntryControllerTest.php +++ b/tests/Controller/EntryControllerTest.php @@ -221,7 +221,7 @@ class EntryControllerTest extends WallabagTestCase */ public function testPostWithMultipleAuthors() { - $url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768'; + $url = 'https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world'; $this->logInAs('admin'); $client = $this->getTestClient(); @@ -245,11 +245,13 @@ class EntryControllerTest extends WallabagTestCase ->findByUrlAndUserId($url, $this->getLoggedInUserId()); $this->assertInstanceOf(Entry::class, $content); + $this->assertSame('2025-12-22', $content->getPublishedAt()->format('Y-m-d')); + $this->assertSame('en', $content->getLanguage()); $authors = $content->getPublishedBy(); - $this->assertSame('2017-04-05', $content->getPublishedAt()->format('Y-m-d')); - $this->assertSame('fr', $content->getLanguage()); - $this->assertStringContainsString('Balenieri', $authors[0]); - $this->assertStringContainsString('Autran', $authors[1]); + $this->assertStringContainsString('Cookman', $authors[0]); + $this->assertStringContainsString('Levitt', $authors[1]); + $this->assertStringContainsString('Osman', $authors[2]); + $this->assertStringContainsString('Salih', $authors[3]); } public function testPostNewOkUrlExist() diff --git a/tests/Controller/Import/InstapaperControllerTest.php b/tests/Controller/Import/InstapaperControllerTest.php index d05c06f05..ba58a52cc 100644 --- a/tests/Controller/Import/InstapaperControllerTest.php +++ b/tests/Controller/Import/InstapaperControllerTest.php @@ -118,15 +118,15 @@ class InstapaperControllerTest extends WallabagTestCase ->get(EntityManagerInterface::class) ->getRepository(Entry::class) ->findByUrlAndUserId( - 'https://www.liberation.fr/societe/police-justice/cours-dassises-on-efface-le-peuple-dun-processus-judiciaire-dont-il-est-pourtant-le-coeur-battant-20210414_FYUNIZENHRGHZLAZEKSMKZYEPI/', + 'https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world', $this->getLoggedInUserId() ); $this->assertInstanceOf(Entry::class, $content); - $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.liberation.fr is ok'); - $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is ok'); - $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is ok'); + $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.theguardian.com is ok'); + $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.theguardian.com is ok'); + $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.theguardian.com is ok'); $this->assertContains('foot', $content->getTagsLabel(), 'It includes the "foot" tag'); $this->assertCount(1, $content->getTags()); $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); diff --git a/tests/fixtures/Import/instapaper-export.csv b/tests/fixtures/Import/instapaper-export.csv index b89f6cb0e..7324e0d16 100644 --- a/tests/fixtures/Import/instapaper-export.csv +++ b/tests/fixtures/Import/instapaper-export.csv @@ -1,5 +1,5 @@ URL,Title,Selection,Folder -https://www.liberation.fr/societe/police-justice/cours-dassises-on-efface-le-peuple-dun-processus-judiciaire-dont-il-est-pourtant-le-coeur-battant-20210414_FYUNIZENHRGHZLAZEKSMKZYEPI/,Cours d’assises : «On efface le peuple d’un processus judiciaire dont il est pourtant le cœur battant»,,Unread +https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world,Childbirth under attack: how women and babies became targets in conflicts around the world,,Unread https://redditblog.com/2016/09/20/amp-and-reactredux/,AMP and React+Redux: Why Not?,,Archive https://medium.com/@the_minh/why-foursquare-swarm-is-still-my-favourite-social-network-e38228493e6c,Why Foursquare / Swarm is still my favourite social network,,Starred https://www.20minutes.fr/high-tech/2077615-20170531-quoi-exactement-tweet-covfefe-donald-trump-persiste-signe,"Dis donc Donald Trump, c'est quoi exactement «covfefe»?",,test_tag