diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-09-19 07:15:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 07:15:40 +0200 |
commit | da18a4682f124b02278860d23ac1d59dee995277 (patch) | |
tree | eabbe9da7203eea41e0cb0ec3c26b9b6599cf58f /tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php | |
parent | 0ed8ce55b5caf2c88e8330afa83abef6c4aac9a4 (diff) | |
parent | 59b97fae996d8307b9d957d210d46200f6d206bf (diff) | |
download | wallabag-da18a4682f124b02278860d23ac1d59dee995277.tar.gz wallabag-da18a4682f124b02278860d23ac1d59dee995277.tar.zst wallabag-da18a4682f124b02278860d23ac1d59dee995277.zip |
Merge pull request #1941 from wallabag/v2-asynchronous-jobs
Use asynchronous jobs for imports
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php')
-rw-r--r-- | tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php | 30 |
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'); |