diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-31 12:32:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 12:32:09 +0200 |
commit | 4423b88c5b2c2d530b0a83a822f521a61ca4d4b8 (patch) | |
tree | 26f8cf2ead0107ac74a7cd9eeb522f222eecbd53 /tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |
parent | d61fd8be4ffdbba8d0fd02468075602a26dfde1a (diff) | |
parent | bad7df8c0048285e7a6bd539e5e501ce6675d663 (diff) | |
download | wallabag-4423b88c5b2c2d530b0a83a822f521a61ca4d4b8.tar.gz wallabag-4423b88c5b2c2d530b0a83a822f521a61ca4d4b8.tar.zst wallabag-4423b88c5b2c2d530b0a83a822f521a61ca4d4b8.zip |
Merge pull request #3168 from wallabag/instapaper-tags-import
Add support for tag in Instapaper import
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php')
-rw-r--r-- | tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | 13 |
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'); |