diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-06-08 22:51:30 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-06-08 22:51:30 +0200 |
commit | e9056dd96f9e8c2e06b5752b8de767bbedfc71ea (patch) | |
tree | df834643a60f3ad95cd9b3722e99d0a55da1a464 | |
parent | be54dfe4e67b90bf6d94139fe968584871ca0f59 (diff) | |
download | wallabag-e9056dd96f9e8c2e06b5752b8de767bbedfc71ea.tar.gz wallabag-e9056dd96f9e8c2e06b5752b8de767bbedfc71ea.tar.zst wallabag-e9056dd96f9e8c2e06b5752b8de767bbedfc71ea.zip |
Fix test
de_DE is not valid language.
Zataz doesn’t send a valid language in their content (they use `fr-FR`).
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 8 | ||||
-rw-r--r-- | tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 74ec34b1..4aa60e90 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -345,7 +345,7 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
345 | 'tags' => 'google', | 345 | 'tags' => 'google', |
346 | 'title' => 'New title for my article', | 346 | 'title' => 'New title for my article', |
347 | 'content' => 'my content', | 347 | 'content' => 'my content', |
348 | 'language' => 'de_DE', | 348 | 'language' => 'de', |
349 | 'published_at' => '2016-09-08T11:55:58+0200', | 349 | 'published_at' => '2016-09-08T11:55:58+0200', |
350 | 'authors' => 'bob,helen', | 350 | 'authors' => 'bob,helen', |
351 | ]); | 351 | ]); |
@@ -362,7 +362,7 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
362 | $this->assertEquals(1, $content['user_id']); | 362 | $this->assertEquals(1, $content['user_id']); |
363 | $this->assertCount(2, $content['tags']); | 363 | $this->assertCount(2, $content['tags']); |
364 | $this->assertSame('my content', $content['content']); | 364 | $this->assertSame('my content', $content['content']); |
365 | $this->assertSame('de_DE', $content['language']); | 365 | $this->assertSame('de', $content['language']); |
366 | $this->assertSame('2016-09-08T11:55:58+0200', $content['published_at']); | 366 | $this->assertSame('2016-09-08T11:55:58+0200', $content['published_at']); |
367 | $this->assertCount(2, $content['published_by']); | 367 | $this->assertCount(2, $content['published_by']); |
368 | $this->assertContains('bob', $content['published_by']); | 368 | $this->assertContains('bob', $content['published_by']); |
@@ -477,7 +477,7 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
477 | 'tags' => 'new tag '.uniqid(), | 477 | 'tags' => 'new tag '.uniqid(), |
478 | 'starred' => '1', | 478 | 'starred' => '1', |
479 | 'archive' => '0', | 479 | 'archive' => '0', |
480 | 'language' => 'de_DE', | 480 | 'language' => 'de_AT', |
481 | 'preview_picture' => 'http://preview.io/picture.jpg', | 481 | 'preview_picture' => 'http://preview.io/picture.jpg', |
482 | 'authors' => 'bob,sponge', | 482 | 'authors' => 'bob,sponge', |
483 | 'content' => 'awesome', | 483 | 'content' => 'awesome', |
@@ -492,7 +492,7 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
492 | $this->assertEquals('New awesome title', $content['title']); | 492 | $this->assertEquals('New awesome title', $content['title']); |
493 | $this->assertGreaterThan($nbTags, count($content['tags'])); | 493 | $this->assertGreaterThan($nbTags, count($content['tags'])); |
494 | $this->assertEquals(1, $content['user_id']); | 494 | $this->assertEquals(1, $content['user_id']); |
495 | $this->assertEquals('de_DE', $content['language']); | 495 | $this->assertEquals('de_AT', $content['language']); |
496 | $this->assertEquals('http://preview.io/picture.jpg', $content['preview_picture']); | 496 | $this->assertEquals('http://preview.io/picture.jpg', $content['preview_picture']); |
497 | $this->assertContains('sponge', $content['published_by']); | 497 | $this->assertContains('sponge', $content['published_by']); |
498 | $this->assertContains('bob', $content['published_by']); | 498 | $this->assertContains('bob', $content['published_by']); |
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php index bde0a600..01decb23 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | |||
@@ -120,7 +120,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase | |||
120 | 120 | ||
121 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok'); | 121 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok'); |
122 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok'); | 122 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok'); |
123 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.zataz.com is ok'); | 123 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.zataz.com is empty because not valid (fr-FR)'); |
124 | 124 | ||
125 | $tags = $content->getTags(); | 125 | $tags = $content->getTags(); |
126 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); | 126 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); |