]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
Add ability to define created_at for all import
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / ReadabilityControllerTest.php
index 92cf4bfc8efd3d147448a89c4c5a3b9504ae13f6..fb39356a140c1b128566c35e0e011629e4a7f7d9 100644 (file)
@@ -49,6 +49,13 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
         $this->assertContains('flashes.import.notice.summary', $body[0]);
+
+        $this->assertNotEmpty($content->getMimetype());
+        $this->assertNotEmpty($content->getPreviewPicture());
+        $this->assertNotEmpty($content->getLanguage());
+        $this->assertEquals(0, count($content->getTags()));
+        $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
+        $this->assertEquals('2016-08-25', $content->getCreatedAt()->format('Y-m-d'));
     }
 
     public function testImportReadabilityWithFileAndMarkAllAsRead()