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.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
index 098cf356..35673261 100644
--- a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
@@ -22,14 +22,29 @@ class PocketControllerTest extends WallabagCoreTestCase
22 $this->logInAs('admin'); 22 $this->logInAs('admin');
23 $client = $this->getClient(); 23 $client = $this->getClient();
24 24
25 $client->getContainer()->get('craue_config')->set('rabbitmq', 1); 25 $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 1);
26 26
27 $crawler = $client->request('GET', '/import/pocket'); 27 $crawler = $client->request('GET', '/import/pocket');
28 28
29 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 29 $this->assertEquals(200, $client->getResponse()->getStatusCode());
30 $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); 30 $this->assertEquals(1, $crawler->filter('button[type=submit]')->count());
31 31
32 $client->getContainer()->get('craue_config')->set('rabbitmq', 0); 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);
33 } 48 }
34 49
35 public function testImportPocketAuthBadToken() 50 public function testImportPocketAuthBadToken()