aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-02-05 15:22:51 +0100
committerJeremy Benoist <j0k3r@users.noreply.github.com>2016-02-05 15:22:51 +0100
commitae5b37ef2e52c06182bc6edb14f6b3aae381ddb4 (patch)
treeaa16a6d3322f6516e3302e15b4217eb0d1111807 /src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
parent565c8efb4fa2e1073f8428f80ff39da2b3e7cec7 (diff)
parent4c46e2609fe0ebb1f6a4b4b23a3d8647a1d9d9cd (diff)
downloadwallabag-ae5b37ef2e52c06182bc6edb14f6b3aae381ddb4.tar.gz
wallabag-ae5b37ef2e52c06182bc6edb14f6b3aae381ddb4.tar.zst
wallabag-ae5b37ef2e52c06182bc6edb14f6b3aae381ddb4.zip
Merge pull request #1651 from wallabag/v2-fix-wllbgv2-import
Test if some keys are missing in v2 import
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()