]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
Tags were not imported in wallabag v2 import
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Tests / Controller / WallabagV2ControllerTest.php
index 58baa8360cb3af0af413c0f2cdc4a5fc6415af46..490f9edeac834a38903eb178ed57c14d1e1c748d 100644 (file)
@@ -40,7 +40,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
         $crawler = $client->followRedirect();
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
-        $this->assertContains('Import summary', $body[0]);
+        $this->assertContains('flashes.import.notice.summary', $body[0]);
 
         $content = $client->getContainer()
             ->get('doctrine.orm.entity_manager')
@@ -53,6 +53,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
         $this->assertEmpty($content->getMimetype());
         $this->assertEmpty($content->getPreviewPicture());
         $this->assertEmpty($content->getLanguage());
+        $this->assertEquals(0, count($content->getTags()));
 
         $content = $client->getContainer()
             ->get('doctrine.orm.entity_manager')
@@ -65,6 +66,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
         $this->assertNotEmpty($content->getMimetype());
         $this->assertNotEmpty($content->getPreviewPicture());
         $this->assertNotEmpty($content->getLanguage());
+        $this->assertEquals(2, count($content->getTags()));
     }
 
     public function testImportWallabagWithEmptyFile()
@@ -88,6 +90,6 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
         $crawler = $client->followRedirect();
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
-        $this->assertContains('Import failed, please try again', $body[0]);
+        $this->assertContains('flashes.import.notice.failed', $body[0]);
     }
 }