]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / FirefoxControllerTest.php
index 2de0aa09395b06b238ee1a3158c2b12dbfe0df6b..6154ae8dca488f2c59b47dfefe8882e3d0a6e76a 100644 (file)
@@ -54,6 +54,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
 
     public function testImportFirefoxWithRedisEnabled()
     {
+        $this->checkRedis();
         $this->logInAs('admin');
         $client = $this->getClient();
         $client->getContainer()->get('craue_config')->set('import_with_redis', 1);
@@ -120,7 +121,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase
         $this->assertNotEmpty($content->getMimetype());
         $this->assertNotEmpty($content->getPreviewPicture());
         $this->assertNotEmpty($content->getLanguage());
-        $this->assertEquals(0, count($content->getTags()));
+        $this->assertEquals(2, count($content->getTags()));
 
         $content = $client->getContainer()
             ->get('doctrine.orm.entity_manager')
@@ -133,6 +134,10 @@ class FirefoxControllerTest extends WallabagCoreTestCase
         $this->assertNotEmpty($content->getMimetype());
         $this->assertNotEmpty($content->getPreviewPicture());
         $this->assertEmpty($content->getLanguage());
+
+        $createdAt = $content->getCreatedAt();
+        $this->assertEquals('2013', $createdAt->format('Y'));
+        $this->assertEquals('12', $createdAt->format('m'));
     }
 
     public function testImportWallabagWithEmptyFile()