From fca2b05200f3e681c3ee195b8bb00088a8de0cf8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 12 Feb 2016 14:49:41 +0100 Subject: import tags from v1 (#1657) --- .../Tests/Controller/WallabagV1ControllerTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Wallabag/ImportBundle/Tests/Controller') diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php index e12ea429..819bb0e6 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php +++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php @@ -39,6 +39,21 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $crawler = $client->followRedirect(); + $content = $client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findByUrlAndUserId( + 'http://www.framablog.org/index.php/post/2014/02/05/Framabag-service-libre-gratuit-interview-developpeur', + $this->getLoggedInUserId() + ); + + $tag = $client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Tag') + ->findOneByLabel('Framabag'); + + $this->assertTrue($content->getTags()->contains($tag)); + $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text'))); $this->assertContains('Import summary', $alert[0]); } -- cgit v1.2.3