diff options
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller')
3 files changed, 51 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php index 69635382..fb835f62 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | |||
@@ -51,6 +51,23 @@ class ReadabilityControllerTest 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 testImportReadabilityBadFile() | ||
55 | { | ||
56 | $this->logInAs('admin'); | ||
57 | $client = $this->getClient(); | ||
58 | |||
59 | $crawler = $client->request('GET', '/import/readability'); | ||
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 testImportReadabilityWithFile() | 71 | public function testImportReadabilityWithFile() |
55 | { | 72 | { |
56 | $this->logInAs('admin'); | 73 | $this->logInAs('admin'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index 933ddd6c..f1113365 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | |||
@@ -51,6 +51,23 @@ class WallabagV1ControllerTest 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-v1'); | ||
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'); |
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'); |