aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
index 250d0d3e..36e5221d 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
@@ -24,7 +24,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
24 $this->logInAs('admin'); 24 $this->logInAs('admin');
25 $client = $this->getClient(); 25 $client = $this->getClient();
26 26
27 $client->getContainer()->get('craue_config')->set('rabbitmq', 1); 27 $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 1);
28 28
29 $crawler = $client->request('GET', '/import/wallabag-v2'); 29 $crawler = $client->request('GET', '/import/wallabag-v2');
30 30
@@ -32,7 +32,23 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
32 $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count()); 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()); 33 $this->assertEquals(1, $crawler->filter('input[type=file]')->count());
34 34
35 $client->getContainer()->get('craue_config')->set('rabbitmq', 0); 35 $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 0);
36 }
37
38 public function testImportWallabagWithRedisEnabled()
39 {
40 $this->logInAs('admin');
41 $client = $this->getClient();
42
43 $client->getContainer()->get('craue_config')->set('import_with_redis', 1);
44
45 $crawler = $client->request('GET', '/import/wallabag-v2');
46
47 $this->assertEquals(200, $client->getResponse()->getStatusCode());
48 $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count());
49 $this->assertEquals(1, $crawler->filter('input[type=file]')->count());
50
51 $client->getContainer()->get('craue_config')->set('import_with_redis', 0);
36 } 52 }
37 53
38 public function testImportWallabagWithFile() 54 public function testImportWallabagWithFile()