aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-06-09 13:51:26 +0200
committerGitHub <noreply@github.com>2017-06-09 13:51:26 +0200
commita8993999893fb665b5e96597f9b649a2a8b940a2 (patch)
tree0c99b2f80a1279b17f44f2b9927f09e40a2001a2 /tests/Wallabag/ApiBundle
parent5c762616c378d20b96eda0f0727eb4c760d4119d (diff)
parent1f7018e1fe369b326150c388b56b8b8c26017234 (diff)
downloadwallabag-a8993999893fb665b5e96597f9b649a2a8b940a2.tar.gz
wallabag-a8993999893fb665b5e96597f9b649a2a8b940a2.tar.zst
wallabag-a8993999893fb665b5e96597f9b649a2a8b940a2.zip
Merge pull request #3192 from wallabag/validate-content-fields
Validate language & preview picture fields
Diffstat (limited to 'tests/Wallabag/ApiBundle')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php8
1 files changed, 4 insertions, 4 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']);