diff options
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller')
4 files changed, 63 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php index e0e61df8..098cf356 100644 --- a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php | |||
@@ -17,6 +17,21 @@ class PocketControllerTest extends WallabagCoreTestCase | |||
17 | $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); | 17 | $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); |
18 | } | 18 | } |
19 | 19 | ||
20 | public function testImportPocketWithRabbitEnabled() | ||
21 | { | ||
22 | $this->logInAs('admin'); | ||
23 | $client = $this->getClient(); | ||
24 | |||
25 | $client->getContainer()->get('craue_config')->set('rabbitmq', 1); | ||
26 | |||
27 | $crawler = $client->request('GET', '/import/pocket'); | ||
28 | |||
29 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
30 | $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); | ||
31 | |||
32 | $client->getContainer()->get('craue_config')->set('rabbitmq', 0); | ||
33 | } | ||
34 | |||
20 | public function testImportPocketAuthBadToken() | 35 | public function testImportPocketAuthBadToken() |
21 | { | 36 | { |
22 | $this->logInAs('admin'); | 37 | $this->logInAs('admin'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php index fb39356a..e12a723d 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | |||
@@ -19,6 +19,22 @@ class ReadabilityControllerTest extends WallabagCoreTestCase | |||
19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | 19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); |
20 | } | 20 | } |
21 | 21 | ||
22 | public function testImportReadabilityWithRabbitEnabled() | ||
23 | { | ||
24 | $this->logInAs('admin'); | ||
25 | $client = $this->getClient(); | ||
26 | |||
27 | $client->getContainer()->get('craue_config')->set('rabbitmq', 1); | ||
28 | |||
29 | $crawler = $client->request('GET', '/import/readability'); | ||
30 | |||
31 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
32 | $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); | ||
33 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | ||
34 | |||
35 | $client->getContainer()->get('craue_config')->set('rabbitmq', 0); | ||
36 | } | ||
37 | |||
22 | public function testImportReadabilityWithFile() | 38 | public function testImportReadabilityWithFile() |
23 | { | 39 | { |
24 | $this->logInAs('admin'); | 40 | $this->logInAs('admin'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index ff1bf6f0..96556717 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | |||
@@ -19,6 +19,22 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | 19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); |
20 | } | 20 | } |
21 | 21 | ||
22 | public function testImportWallabagWithRabbitEnabled() | ||
23 | { | ||
24 | $this->logInAs('admin'); | ||
25 | $client = $this->getClient(); | ||
26 | |||
27 | $client->getContainer()->get('craue_config')->set('rabbitmq', 1); | ||
28 | |||
29 | $crawler = $client->request('GET', '/import/wallabag-v1'); | ||
30 | |||
31 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
32 | $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); | ||
33 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | ||
34 | |||
35 | $client->getContainer()->get('craue_config')->set('rabbitmq', 0); | ||
36 | } | ||
37 | |||
22 | public function testImportWallabagWithFile() | 38 | public function testImportWallabagWithFile() |
23 | { | 39 | { |
24 | $this->logInAs('admin'); | 40 | $this->logInAs('admin'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index 149e88bb..250d0d3e 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |||
@@ -19,6 +19,22 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | 19 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); |
20 | } | 20 | } |
21 | 21 | ||
22 | public function testImportWallabagWithRabbitEnabled() | ||
23 | { | ||
24 | $this->logInAs('admin'); | ||
25 | $client = $this->getClient(); | ||
26 | |||
27 | $client->getContainer()->get('craue_config')->set('rabbitmq', 1); | ||
28 | |||
29 | $crawler = $client->request('GET', '/import/wallabag-v2'); | ||
30 | |||
31 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
32 | $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); | ||
33 | $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); | ||
34 | |||
35 | $client->getContainer()->get('craue_config')->set('rabbitmq', 0); | ||
36 | } | ||
37 | |||
22 | public function testImportWallabagWithFile() | 38 | public function testImportWallabagWithFile() |
23 | { | 39 | { |
24 | $this->logInAs('admin'); | 40 | $this->logInAs('admin'); |