aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
index e0e61df8..35673261 100644
--- a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
@@ -17,6 +17,36 @@ 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('import_with_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('import_with_rabbitmq', 0);
33 }
34
35 public function testImportPocketWithRedisEnabled()
36 {
37 $this->logInAs('admin');
38 $client = $this->getClient();
39
40 $client->getContainer()->get('craue_config')->set('import_with_redis', 1);
41
42 $crawler = $client->request('GET', '/import/pocket');
43
44 $this->assertEquals(200, $client->getResponse()->getStatusCode());
45 $this->assertEquals(1, $crawler->filter('button[type=submit]')->count());
46
47 $client->getContainer()->get('craue_config')->set('import_with_redis', 0);
48 }
49
20 public function testImportPocketAuthBadToken() 50 public function testImportPocketAuthBadToken()
21 { 51 {
22 $this->logInAs('admin'); 52 $this->logInAs('admin');