From e491052b0d0d5e594352cf8194dade946a829328 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 14 Apr 2021 13:07:34 +0200 Subject: [PATCH 1/2] Fix 404 on real content test URL --- .../ImportBundle/Controller/InstapaperControllerTest.php | 2 +- tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php index 4d9b3fe96..6e7c0be1c 100644 --- a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php @@ -114,7 +114,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase ->get('doctrine.orm.entity_manager') ->getRepository('WallabagCoreBundle:Entry') ->findByUrlAndUserId( - 'https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551', + '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/', $this->getLoggedInUserId() ); diff --git a/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv b/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv index 5380bf2ce..b89f6cb0e 100644 --- a/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv +++ b/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv @@ -1,5 +1,5 @@ URL,Title,Selection,Folder -https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551,Baumettes : un tour en cellule,,Unread +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://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 From 6324d30db24407f06c1a75ece5e6ce9067fc683f Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 14 Apr 2021 13:07:46 +0200 Subject: [PATCH 2/2] Fix PHPUnit deprecated warning --- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 2e3048cf9..627bf87b7 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -207,8 +207,8 @@ class EntryControllerTest extends WallabagCoreTestCase $authors = $content->getPublishedBy(); $this->assertSame('2017-04-05', $content->getPublishedAt()->format('Y-m-d')); $this->assertSame('fr', $content->getLanguage()); - $this->assertContains('Balenieri', $authors[0]); - $this->assertContains('Autran', $authors[1]); + $this->assertStringContainsString('Balenieri', $authors[0]); + $this->assertStringContainsString('Autran', $authors[1]); } public function testPostNewOkUrlExist()