aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 20:24:04 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 22:15:31 +0200
commit015c7a8359c950f9621b38b11c3973860a981da8 (patch)
treec9564ff38242df100e19f2de77d8d640599c0ea2 /tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
parent7d862f83b95d24b4f081d73ca7b0bdf4435ae008 (diff)
downloadwallabag-015c7a8359c950f9621b38b11c3973860a981da8.tar.gz
wallabag-015c7a8359c950f9621b38b11c3973860a981da8.tar.zst
wallabag-015c7a8359c950f9621b38b11c3973860a981da8.zip
Add more tests
And ability to define how many messages can be hanle by the redis worker before stopping (usefull for tests)
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
index 36e5221d..b20226ad 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
@@ -51,6 +51,23 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
51 $client->getContainer()->get('craue_config')->set('import_with_redis', 0); 51 $client->getContainer()->get('craue_config')->set('import_with_redis', 0);
52 } 52 }
53 53
54 public function testImportWallabagBadFile()
55 {
56 $this->logInAs('admin');
57 $client = $this->getClient();
58
59 $crawler = $client->request('GET', '/import/wallabag-v2');
60 $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
61
62 $data = [
63 'upload_import_file[file]' => '',
64 ];
65
66 $client->submit($form, $data);
67
68 $this->assertEquals(200, $client->getResponse()->getStatusCode());
69 }
70
54 public function testImportWallabagWithFile() 71 public function testImportWallabagWithFile()
55 { 72 {
56 $this->logInAs('admin'); 73 $this->logInAs('admin');