aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2018-04-01 11:12:32 +0200
committerGitHub <noreply@github.com>2018-04-01 11:12:32 +0200
commit3b46d0f947958e05c55bb10a817e94a860cda6ef (patch)
tree0085e28cf7bc1103d33ade2de4c13def4f871da7 /tests/Wallabag
parent727880c950d485293e480b5b835a0490be4f0ce7 (diff)
parent80d4260a8e481861ef13de661e8770b86be6ad78 (diff)
downloadwallabag-3b46d0f947958e05c55bb10a817e94a860cda6ef.tar.gz
wallabag-3b46d0f947958e05c55bb10a817e94a860cda6ef.tar.zst
wallabag-3b46d0f947958e05c55bb10a817e94a860cda6ef.zip
Merge pull request #3619 from notFloran/fix-tests
Fix tests
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php8
-rw-r--r--tests/Wallabag/CoreBundle/Tools/UtilsTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php8
-rw-r--r--tests/Wallabag/ImportBundle/fixtures/readability.json4
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 12788366..95482fe4 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -1309,12 +1309,12 @@ class EntryControllerTest extends WallabagCoreTestCase
1309 'https://www.pravda.ru/world/09-06-2017/1337283-qatar-0/', 1309 'https://www.pravda.ru/world/09-06-2017/1337283-qatar-0/',
1310 'ru', 1310 'ru',
1311 ], 1311 ],
1312 'fr-FR' => [ 1312 'fr' => [
1313 'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/', 1313 'https://fr.wikipedia.org/wiki/Wallabag',
1314 'fr_FR', 1314 'fr',
1315 ], 1315 ],
1316 'de' => [ 1316 'de' => [
1317 'http://www.bild.de/politik/ausland/theresa-may/wahlbeben-grossbritannien-analyse-52108924.bild.html', 1317 'https://www.bild.de/politik/ausland/theresa-may/wahlbeben-grossbritannien-analyse-52108924.bild.html',
1318 'de', 1318 'de',
1319 ], 1319 ],
1320 'it' => [ 1320 'it' => [
diff --git a/tests/Wallabag/CoreBundle/Tools/UtilsTest.php b/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
index 347589dc..952d076d 100644
--- a/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
+++ b/tests/Wallabag/CoreBundle/Tools/UtilsTest.php
@@ -13,7 +13,7 @@ class UtilsTest extends TestCase
13 */ 13 */
14 public function testCorrectWordsCountForDifferentLanguages($text, $expectedCount) 14 public function testCorrectWordsCountForDifferentLanguages($text, $expectedCount)
15 { 15 {
16 static::assertEquals((float) $expectedCount, Utils::getReadingTime($text)); 16 static::assertSame((float) $expectedCount, Utils::getReadingTime($text));
17 } 17 }
18 18
19 public function examples() 19 public function examples()
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
index fcb9dfab..78816ad8 100644
--- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
@@ -111,7 +111,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
111 ->get('doctrine.orm.entity_manager') 111 ->get('doctrine.orm.entity_manager')
112 ->getRepository('WallabagCoreBundle:Entry') 112 ->getRepository('WallabagCoreBundle:Entry')
113 ->findByUrlAndUserId( 113 ->findByUrlAndUserId(
114 'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/', 114 'https://www.20minutes.fr/bordeaux/2120479-20170823-bordeaux-poche-chocolatine-association-traduit-etudiants-etrangers-mots-sud-ouest',
115 $this->getLoggedInUserId() 115 $this->getLoggedInUserId()
116 ); 116 );
117 117
@@ -119,9 +119,9 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
119 $this->assertContains('flashes.import.notice.summary', $body[0]); 119 $this->assertContains('flashes.import.notice.summary', $body[0]);
120 120
121 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); 121 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok'); 122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.20minutes.fr is ok');
123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok'); 123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.20minutes.fr is ok');
124 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.zataz.com is ok'); 124 $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.20minutes.fr is ok');
125 125
126 $tags = $content->getTags(); 126 $tags = $content->getTags();
127 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 127 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
diff --git a/tests/Wallabag/ImportBundle/fixtures/readability.json b/tests/Wallabag/ImportBundle/fixtures/readability.json
index ba7be5bf..f71b8d19 100644
--- a/tests/Wallabag/ImportBundle/fixtures/readability.json
+++ b/tests/Wallabag/ImportBundle/fixtures/readability.json
@@ -21,8 +21,8 @@
21 "archive": 0, 21 "archive": 0,
22 "date_added": "2016-09-08T11:55:58+0200", 22 "date_added": "2016-09-08T11:55:58+0200",
23 "favorite": 0, 23 "favorite": 0,
24 "article__title": "90% des dossiers médicaux des Coréens du sud vendus à des entreprises privées - ZATAZ", 24 "article__title": "Bordeaux: Poche, chocolatine… Une association traduit aux étudiants étrangers les mots du Sud-Ouest",
25 "article__url": "https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/" 25 "article__url": "https://www.20minutes.fr/bordeaux/2120479-20170823-bordeaux-poche-chocolatine-association-traduit-etudiants-etrangers-mots-sud-ouest"
26 } 26 }
27 ], 27 ],
28 "recommendations": [] 28 "recommendations": []