]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
Fix MondeDiplo https url
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / EntryControllerTest.php
index b528bcdb6f7da9a78b8e9c34afd2666ab34e62f3..ca275b32764aacc445a5487513405d4aa135a582 100644 (file)
@@ -43,6 +43,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $client = $this->getClient();
 
         $client->request('GET', '/unread/list');
+        $this->assertSame(302, $client->getResponse()->getStatusCode());
         $crawler = $client->followRedirect();
 
         $this->assertSame(200, $client->getResponse()->getStatusCode());
@@ -505,7 +506,7 @@ class EntryControllerTest extends WallabagCoreTestCase
             ->getRepository('WallabagCoreBundle:Entry')
             ->find($entry->getId());
 
-        $this->assertSame($res->isArchived(), true);
+        $this->assertSame(1, $res->isArchived());
     }
 
     public function testToggleStar()
@@ -528,7 +529,7 @@ class EntryControllerTest extends WallabagCoreTestCase
             ->getRepository('WallabagCoreBundle:Entry')
             ->findOneById($entry->getId());
 
-        $this->assertSame($res->isStarred(), true);
+        $this->assertSame(1, $res->isStarred());
     }
 
     public function testDelete()
@@ -1004,7 +1005,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertSame($url, $entry->getUrl());
         $this->assertContains('Perpignan', $entry->getTitle());
         // instead of checking for the filename (which might change) check that the image is now local
-        $this->assertContains('https://your-wallabag-url-instance.com/assets/images/', $entry->getContent());
+        $this->assertContains($client->getContainer()->getParameter('domain_name') . '/assets/images/', $entry->getContent());
 
         $client->getContainer()->get('craue_config')->set('download_images_enabled', 0);
     }
@@ -1267,7 +1268,7 @@ class EntryControllerTest extends WallabagCoreTestCase
                 'ru',
             ],
             'fr-FR' => [
-                'http://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/',
+                'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/',
                 'fr_FR',
             ],
             'de' => [
@@ -1296,10 +1297,10 @@ class EntryControllerTest extends WallabagCoreTestCase
             ],
             'fucked_list_of_languages' => [
                 'http://geocatalog.webservice-energy.org/geonetwork/srv/eng/main.home',
-                '',
+                null,
             ],
             'es-ES' => [
-                'http://www.muylinux.com/2015/04/17/odf-reino-unido-microsoft-google',
+                'https://www.muylinux.com/2015/04/17/odf-reino-unido-microsoft-google/',
                 'es_ES',
             ],
         ];
@@ -1342,7 +1343,7 @@ class EntryControllerTest extends WallabagCoreTestCase
      */
     public function testRestrictedArticle()
     {
-        $url = 'http://www.monde-diplomatique.fr/2017/05/BONNET/57475';
+        $url = 'https://www.monde-diplomatique.fr/2017/05/BONNET/57475';
         $this->logInAs('admin');
         $client = $this->getClient();
         $em = $client->getContainer()->get('doctrine.orm.entity_manager');