From b3437d58ae224121375c99e9288d8b808524e624 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 9 Sep 2016 21:02:03 +0200 Subject: 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` - --- .../Controller/WallabagV1ControllerTest.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php') diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index 96556717..933ddd6c 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php @@ -24,7 +24,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $this->logInAs('admin'); $client = $this->getClient(); - $client->getContainer()->get('craue_config')->set('rabbitmq', 1); + $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 1); $crawler = $client->request('GET', '/import/wallabag-v1'); @@ -32,7 +32,23 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); - $client->getContainer()->get('craue_config')->set('rabbitmq', 0); + $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 0); + } + + public function testImportWallabagWithRedisEnabled() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->getContainer()->get('craue_config')->set('import_with_redis', 1); + + $crawler = $client->request('GET', '/import/wallabag-v1'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); + $this->assertEquals(1, $crawler->filter('input[type=file]')->count()); + + $client->getContainer()->get('craue_config')->set('import_with_redis', 0); } public function testImportWallabagWithFile() -- cgit v1.2.3