diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-09-21 08:56:20 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-09-21 09:07:40 +0200 |
commit | 84b3bdaac00f3781929779d2ad1fb205aad1ea86 (patch) | |
tree | 796aecadeab07b7c3ac2dd72bea69c9ca5dcc8e1 /tests | |
parent | 8013f35d96c42b15c1da28cdff40e97289ad4e25 (diff) | |
download | wallabag-84b3bdaac00f3781929779d2ad1fb205aad1ea86.tar.gz wallabag-84b3bdaac00f3781929779d2ad1fb205aad1ea86.tar.zst wallabag-84b3bdaac00f3781929779d2ad1fb205aad1ea86.zip |
Liberation goes https
Diffstat (limited to 'tests')
5 files changed, 14 insertions, 11 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 3d599ec8..bf0068b4 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -174,7 +174,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
174 | 174 | ||
175 | public function testPostWithMultipleAuthors() | 175 | public function testPostWithMultipleAuthors() |
176 | { | 176 | { |
177 | $url = 'http://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768'; | 177 | $url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768'; |
178 | $this->logInAs('admin'); | 178 | $this->logInAs('admin'); |
179 | $client = $this->getClient(); | 179 | $client = $this->getClient(); |
180 | 180 | ||
@@ -197,6 +197,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
197 | ->getRepository('WallabagCoreBundle:Entry') | 197 | ->getRepository('WallabagCoreBundle:Entry') |
198 | ->findByUrlAndUserId($url, $this->getLoggedInUserId()); | 198 | ->findByUrlAndUserId($url, $this->getLoggedInUserId()); |
199 | 199 | ||
200 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
200 | $authors = $content->getPublishedBy(); | 201 | $authors = $content->getPublishedBy(); |
201 | $this->assertSame('2017-04-05 19:26:13', $content->getPublishedAt()->format('Y-m-d H:i:s')); | 202 | $this->assertSame('2017-04-05 19:26:13', $content->getPublishedAt()->format('Y-m-d H:i:s')); |
202 | $this->assertSame('fr', $content->getLanguage()); | 203 | $this->assertSame('fr', $content->getLanguage()); |
diff --git a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php index 80bfc3b4..7390fa88 100644 --- a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php | |||
@@ -114,13 +114,15 @@ class InstapaperControllerTest extends WallabagCoreTestCase | |||
114 | ->get('doctrine.orm.entity_manager') | 114 | ->get('doctrine.orm.entity_manager') |
115 | ->getRepository('WallabagCoreBundle:Entry') | 115 | ->getRepository('WallabagCoreBundle:Entry') |
116 | ->findByUrlAndUserId( | 116 | ->findByUrlAndUserId( |
117 | 'http://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551', | 117 | 'https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551', |
118 | $this->getLoggedInUserId() | 118 | $this->getLoggedInUserId() |
119 | ); | 119 | ); |
120 | 120 | ||
121 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is ok'); | 121 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); |
122 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok'); | 122 | |
123 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok'); | 123 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.liberation.fr is ok'); |
124 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is ok'); | ||
125 | $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is ok'); | ||
124 | $this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag'); | 126 | $this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag'); |
125 | $this->assertSame(1, \count($content->getTags())); | 127 | $this->assertSame(1, \count($content->getTags())); |
126 | $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); | 128 | $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index 67490714..822656ba 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |||
@@ -115,16 +115,16 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
115 | ->get('doctrine.orm.entity_manager') | 115 | ->get('doctrine.orm.entity_manager') |
116 | ->getRepository('WallabagCoreBundle:Entry') | 116 | ->getRepository('WallabagCoreBundle:Entry') |
117 | ->findByUrlAndUserId( | 117 | ->findByUrlAndUserId( |
118 | 'http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867', | 118 | 'https://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867', |
119 | $this->getLoggedInUserId() | 119 | $this->getLoggedInUserId() |
120 | ); | 120 | ); |
121 | 121 | ||
122 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | 122 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); |
123 | 123 | ||
124 | // empty because it wasn't re-imported | 124 | // empty because it wasn't re-imported |
125 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is empty'); | 125 | $this->assertEmpty($content->getMimetype(), 'Mimetype for https://www.liberation.fr is empty'); |
126 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is empty'); | 126 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is empty'); |
127 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is empty'); | 127 | $this->assertEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is empty'); |
128 | 128 | ||
129 | $tags = $content->getTags(); | 129 | $tags = $content->getTags(); |
130 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); | 130 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); |
diff --git a/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv b/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv index 7b692d00..5380bf2c 100644 --- a/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv +++ b/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv | |||
@@ -1,5 +1,5 @@ | |||
1 | URL,Title,Selection,Folder | 1 | URL,Title,Selection,Folder |
2 | http://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551,Baumettes : un tour en cellule,,Unread | 2 | https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551,Baumettes : un tour en cellule,,Unread |
3 | https://redditblog.com/2016/09/20/amp-and-reactredux/,AMP and React+Redux: Why Not?,,Archive | 3 | https://redditblog.com/2016/09/20/amp-and-reactredux/,AMP and React+Redux: Why Not?,,Archive |
4 | 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 | 4 | 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 |
5 | 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 | 5 | 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 |
diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json b/tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json index 63c44cf9..a2142f90 100644 --- a/tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json +++ b/tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json | |||
@@ -21,7 +21,7 @@ | |||
21 | { | 21 | { |
22 | "id": 22, | 22 | "id": 22, |
23 | "title": "Réfugiés: l'UE va créer 100 000 places d'accueil dans les Balkans", | 23 | "title": "Réfugiés: l'UE va créer 100 000 places d'accueil dans les Balkans", |
24 | "url": "http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867", | 24 | "url": "https://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867", |
25 | "is_archived": false, | 25 | "is_archived": false, |
26 | "created_at": "2016-09-08T11:55:58+0200", | 26 | "created_at": "2016-09-08T11:55:58+0200", |
27 | "updated_at": "2016-09-08T11:57:16+0200", | 27 | "updated_at": "2016-09-08T11:57:16+0200", |