aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
index 335115fe..18a02522 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
@@ -122,7 +122,10 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is ok'); 122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is ok');
123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok'); 123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok');
124 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok'); 124 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok');
125 $this->assertEquals(1, count($content->getTags())); 125
126 $tags = $content->getTags();
127 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
128 $this->assertEquals(1, count($tags));
126 129
127 $content = $client->getContainer() 130 $content = $client->getContainer()
128 ->get('doctrine.orm.entity_manager') 131 ->get('doctrine.orm.entity_manager')
@@ -135,7 +138,13 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
135 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.mediapart.fr is ok'); 138 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.mediapart.fr is ok');
136 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.mediapart.fr is ok'); 139 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.mediapart.fr is ok');
137 $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.mediapart.fr is ok'); 140 $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.mediapart.fr is ok');
138 $this->assertEquals(3, count($content->getTags())); 141
142 $tags = $content->getTags();
143 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
144 $this->assertContains('mediapart', $tags, 'It includes the "mediapart" tag');
145 $this->assertContains('blog', $tags, 'It includes the "blog" tag');
146 $this->assertEquals(3, count($tags));
147
139 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 148 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
140 $this->assertEquals('2016-09-08', $content->getCreatedAt()->format('Y-m-d')); 149 $this->assertEquals('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
141 $this->assertTrue($content->isStarred(), 'Entry is starred'); 150 $this->assertTrue($content->isStarred(), 'Entry is starred');