]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3619 from notFloran/fix-tests
authorJérémy Benoist <j0k3r@users.noreply.github.com>
Sun, 1 Apr 2018 09:12:32 +0000 (11:12 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Apr 2018 09:12:32 +0000 (11:12 +0200)
Fix tests

tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
tests/Wallabag/CoreBundle/Tools/UtilsTest.php
tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
tests/Wallabag/ImportBundle/fixtures/readability.json

index 12788366d5ce0799e2f7e3dd39c05db9382c5afc..95482fe4b580b8ab2881b35eecebbf1e71644638 100644 (file)
@@ -1309,12 +1309,12 @@ class EntryControllerTest extends WallabagCoreTestCase
                 'https://www.pravda.ru/world/09-06-2017/1337283-qatar-0/',
                 'ru',
             ],
-            'fr-FR' => [
-                'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/',
-                'fr_FR',
+            'fr' => [
+                'https://fr.wikipedia.org/wiki/Wallabag',
+                'fr',
             ],
             'de' => [
-                'http://www.bild.de/politik/ausland/theresa-may/wahlbeben-grossbritannien-analyse-52108924.bild.html',
+                'https://www.bild.de/politik/ausland/theresa-may/wahlbeben-grossbritannien-analyse-52108924.bild.html',
                 'de',
             ],
             'it' => [
index 347589dc00b408191565be01ec8dcbbdcd470175..952d076d1b7c0f7a208fd561fb75a6d4da44ae11 100644 (file)
@@ -13,7 +13,7 @@ class UtilsTest extends TestCase
      */
     public function testCorrectWordsCountForDifferentLanguages($text, $expectedCount)
     {
-        static::assertEquals((float) $expectedCount, Utils::getReadingTime($text));
+        static::assertSame((float) $expectedCount, Utils::getReadingTime($text));
     }
 
     public function examples()
index fcb9dfab142c8632d6fa14078790c0270f112f21..78816ad884fe2dca9783e94a717962cdd0219883 100644 (file)
@@ -111,7 +111,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
             ->get('doctrine.orm.entity_manager')
             ->getRepository('WallabagCoreBundle:Entry')
             ->findByUrlAndUserId(
-                'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/',
+                'https://www.20minutes.fr/bordeaux/2120479-20170823-bordeaux-poche-chocolatine-association-traduit-etudiants-etrangers-mots-sud-ouest',
                 $this->getLoggedInUserId()
             );
 
@@ -119,9 +119,9 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
         $this->assertContains('flashes.import.notice.summary', $body[0]);
 
         $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
-        $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok');
-        $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok');
-        $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.zataz.com is ok');
+        $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.20minutes.fr is ok');
+        $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.20minutes.fr is ok');
+        $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.20minutes.fr is ok');
 
         $tags = $content->getTags();
         $this->assertContains('foot', $tags, 'It includes the "foot" tag');
index ba7be5bfa2dcaad5bd719c7f82748933c3a5b80c..f71b8d19a5181322a07b0bcb7c94829cd8530e27 100644 (file)
@@ -21,8 +21,8 @@
             "archive": 0,
             "date_added": "2016-09-08T11:55:58+0200",
             "favorite": 0,
-            "article__title": "90% des dossiers médicaux des Coréens du sud vendus à des entreprises privées - ZATAZ",
-            "article__url": "https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/"
+            "article__title": "Bordeaux: Poche, chocolatine… Une association traduit aux étudiants étrangers les mots du Sud-Ouest",
+            "article__url": "https://www.20minutes.fr/bordeaux/2120479-20170823-bordeaux-poche-chocolatine-association-traduit-etudiants-etrangers-mots-sud-ouest"
         }
    ],
     "recommendations": []