X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FEntryControllerTest.php;h=ca275b32764aacc445a5487513405d4aa135a582;hb=f645d371ce55e9c2a45712df34244318742b0d74;hp=b528bcdb6f7da9a78b8e9c34afd2666ab34e62f3;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index b528bcdb..ca275b32 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -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');