]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php
Added notmatches operator for tagging rule
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / ChromeControllerTest.php
index 8890c5b15e7fd419442b8eebfb02681df3dbce7f..8e9f65e31db559c91f23228192432b890f4019f3 100644 (file)
@@ -54,6 +54,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
 
     public function testImportChromeWithRedisEnabled()
     {
+        $this->checkRedis();
         $this->logInAs('admin');
         $client = $this->getClient();
         $client->getContainer()->get('craue_config')->set('import_with_redis', 1);
@@ -117,9 +118,13 @@ class ChromeControllerTest extends WallabagCoreTestCase
                 $this->getLoggedInUserId()
             );
 
-        $this->assertNotEmpty($content->getPreviewPicture());
-        $this->assertNotEmpty($content->getLanguage());
-        $this->assertEquals(0, count($content->getTags()));
+        $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.usinenouvelle.com is ok');
+        $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.usinenouvelle.com is ok');
+        $this->assertEquals(1, count($content->getTags()));
+
+        $createdAt = $content->getCreatedAt();
+        $this->assertEquals('2011', $createdAt->format('Y'));
+        $this->assertEquals('07', $createdAt->format('m'));
     }
 
     public function testImportWallabagWithEmptyFile()