diff options
Diffstat (limited to 'tests/Wallabag/ImportBundle')
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php index 92cf4bfc..fb39356a 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | |||
@@ -49,6 +49,13 @@ class ReadabilityControllerTest extends WallabagCoreTestCase | |||
49 | 49 | ||
50 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 50 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
51 | $this->assertContains('flashes.import.notice.summary', $body[0]); | 51 | $this->assertContains('flashes.import.notice.summary', $body[0]); |
52 | |||
53 | $this->assertNotEmpty($content->getMimetype()); | ||
54 | $this->assertNotEmpty($content->getPreviewPicture()); | ||
55 | $this->assertNotEmpty($content->getLanguage()); | ||
56 | $this->assertEquals(0, count($content->getTags())); | ||
57 | $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); | ||
58 | $this->assertEquals('2016-08-25', $content->getCreatedAt()->format('Y-m-d')); | ||
52 | } | 59 | } |
53 | 60 | ||
54 | public function testImportReadabilityWithFileAndMarkAllAsRead() | 61 | public function testImportReadabilityWithFileAndMarkAllAsRead() |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index c1025b41..ff1bf6f0 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | |||
@@ -56,6 +56,12 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
56 | 56 | ||
57 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 57 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
58 | $this->assertContains('flashes.import.notice.summary', $body[0]); | 58 | $this->assertContains('flashes.import.notice.summary', $body[0]); |
59 | |||
60 | $this->assertEmpty($content->getMimetype()); | ||
61 | $this->assertEmpty($content->getPreviewPicture()); | ||
62 | $this->assertEmpty($content->getLanguage()); | ||
63 | $this->assertEquals(1, count($content->getTags())); | ||
64 | $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); | ||
59 | } | 65 | } |
60 | 66 | ||
61 | public function testImportWallabagWithFileAndMarkAllAsRead() | 67 | public function testImportWallabagWithFileAndMarkAllAsRead() |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index d8d2c8bf..149e88bb 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |||
@@ -67,6 +67,8 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
67 | $this->assertNotEmpty($content->getPreviewPicture()); | 67 | $this->assertNotEmpty($content->getPreviewPicture()); |
68 | $this->assertNotEmpty($content->getLanguage()); | 68 | $this->assertNotEmpty($content->getLanguage()); |
69 | $this->assertEquals(2, count($content->getTags())); | 69 | $this->assertEquals(2, count($content->getTags())); |
70 | $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); | ||
71 | $this->assertEquals('2016-09-08', $content->getCreatedAt()->format('Y-m-d')); | ||
70 | } | 72 | } |
71 | 73 | ||
72 | public function testImportWallabagWithEmptyFile() | 74 | public function testImportWallabagWithEmptyFile() |