Liberation goes https

This commit is contained in:
Jeremy Benoist 2018-09-21 08:56:20 +02:00
parent 8013f35d96
commit 84b3bdaac0
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
5 changed files with 14 additions and 11 deletions

View file

@ -174,7 +174,7 @@ class EntryControllerTest extends WallabagCoreTestCase
public function testPostWithMultipleAuthors() public function testPostWithMultipleAuthors()
{ {
$url = 'http://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768'; $url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768';
$this->logInAs('admin'); $this->logInAs('admin');
$client = $this->getClient(); $client = $this->getClient();
@ -197,6 +197,7 @@ class EntryControllerTest extends WallabagCoreTestCase
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findByUrlAndUserId($url, $this->getLoggedInUserId()); ->findByUrlAndUserId($url, $this->getLoggedInUserId());
$this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
$authors = $content->getPublishedBy(); $authors = $content->getPublishedBy();
$this->assertSame('2017-04-05 19:26:13', $content->getPublishedAt()->format('Y-m-d H:i:s')); $this->assertSame('2017-04-05 19:26:13', $content->getPublishedAt()->format('Y-m-d H:i:s'));
$this->assertSame('fr', $content->getLanguage()); $this->assertSame('fr', $content->getLanguage());

View file

@ -114,13 +114,15 @@ class InstapaperControllerTest extends WallabagCoreTestCase
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findByUrlAndUserId( ->findByUrlAndUserId(
'http://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551', 'https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551',
$this->getLoggedInUserId() $this->getLoggedInUserId()
); );
$this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is ok'); $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok');
$this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok'); $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->assertContains('foot', $content->getTags(), 'It includes the "foot" tag'); $this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag');
$this->assertSame(1, \count($content->getTags())); $this->assertSame(1, \count($content->getTags()));
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());

View file

@ -115,16 +115,16 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findByUrlAndUserId( ->findByUrlAndUserId(
'http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867', 'https://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867',
$this->getLoggedInUserId() $this->getLoggedInUserId()
); );
$this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
// empty because it wasn't re-imported // empty because it wasn't re-imported
$this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is empty'); $this->assertEmpty($content->getMimetype(), 'Mimetype for https://www.liberation.fr is empty');
$this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is empty'); $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is empty');
$this->assertEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is empty'); $this->assertEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is empty');
$tags = $content->getTags(); $tags = $content->getTags();
$this->assertContains('foot', $tags, 'It includes the "foot" tag'); $this->assertContains('foot', $tags, 'It includes the "foot" tag');

View file

@ -1,5 +1,5 @@
URL,Title,Selection,Folder URL,Title,Selection,Folder
http://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551,Baumettes : un tour en cellule,,Unread https://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551,Baumettes : un tour en cellule,,Unread
https://redditblog.com/2016/09/20/amp-and-reactredux/,AMP and React+Redux: Why Not?,,Archive 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://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 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

1 URL Title Selection Folder
2 http://www.liberation.fr/societe/2012/12/06/baumettes-un-tour-en-cellule_865551 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
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

View file

@ -21,7 +21,7 @@
{ {
"id": 22, "id": 22,
"title": "Réfugiés: l'UE va créer 100 000 places d'accueil dans les Balkans", "title": "Réfugiés: l'UE va créer 100 000 places d'accueil dans les Balkans",
"url": "http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867", "url": "https://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867",
"is_archived": false, "is_archived": false,
"created_at": "2016-09-08T11:55:58+0200", "created_at": "2016-09-08T11:55:58+0200",
"updated_at": "2016-09-08T11:57:16+0200", "updated_at": "2016-09-08T11:57:16+0200",