aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-09 09:36:07 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 21:58:55 +0200
commit6d65c0a8b089d3caa6f8e20d7935a9fe2f87d926 (patch)
tree38ea829aeea879f4bfdd9873cea556a244247b7e /tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
parent3aca0a9f00417b64203a660dee0a2b4c0fe22ac8 (diff)
downloadwallabag-6d65c0a8b089d3caa6f8e20d7935a9fe2f87d926.tar.gz
wallabag-6d65c0a8b089d3caa6f8e20d7935a9fe2f87d926.tar.zst
wallabag-6d65c0a8b089d3caa6f8e20d7935a9fe2f87d926.zip
Add ability to define created_at for all import
At the moment only Readability & wallabag v2 import allow created_at import. Pocket removed `time_added` field from their API v2 to v3... And wallabag v1 doesn't export that value.
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php7
1 files changed, 7 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()