aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-09 21:02:03 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 21:58:56 +0200
commitb3437d58ae224121375c99e9288d8b808524e624 (patch)
tree94ce3446aed4396ba9304b8c97e421eba35e4edf /tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
parent7f7531171f6e49110b5842f869e37c766a682473 (diff)
downloadwallabag-b3437d58ae224121375c99e9288d8b808524e624.tar.gz
wallabag-b3437d58ae224121375c99e9288d8b808524e624.tar.zst
wallabag-b3437d58ae224121375c99e9288d8b808524e624.zip
Enable Redis async import
- using javibravo/simpleue - internal config value are now `import_with_redis` & `import_with_rabbit` which are more clear - if both option are enable rabbit will be choosen - services imports related to async are now splitted into 2 files: `redis.yml` & `rabbit.yml` -
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()