aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php')
-rw-r--r--src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
index a77c0f6b..617c0517 100644
--- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
+++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
@@ -41,6 +41,30 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
41 41
42 $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text'))); 42 $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
43 $this->assertContains('Import summary', $alert[0]); 43 $this->assertContains('Import summary', $alert[0]);
44
45 $content = $client->getContainer()
46 ->get('doctrine.orm.entity_manager')
47 ->getRepository('WallabagCoreBundle:Entry')
48 ->findByUrlAndUserId(
49 'http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867',
50 $this->getLoggedInUserId()
51 );
52
53 $this->assertEmpty($content->getMimetype());
54 $this->assertEmpty($content->getPreviewPicture());
55 $this->assertEmpty($content->getLanguage());
56
57 $content = $client->getContainer()
58 ->get('doctrine.orm.entity_manager')
59 ->getRepository('WallabagCoreBundle:Entry')
60 ->findByUrlAndUserId(
61 'https://www.mediapart.fr/',
62 $this->getLoggedInUserId()
63 );
64
65 $this->assertNotEmpty($content->getMimetype());
66 $this->assertNotEmpty($content->getPreviewPicture());
67 $this->assertNotEmpty($content->getLanguage());
44 } 68 }
45 69
46 public function testImportWallabagWithEmptyFile() 70 public function testImportWallabagWithEmptyFile()