X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FImportBundle%2FController%2FPocketControllerTest.php;h=7d6a300fb3fbdce2f7091a41f19e0e3fb4d04592;hb=0e0102b6fcd17266f39dd63a808740d01ab9bd8a;hp=e0e61df88c43d5d5161128a261738bf9385c0e69;hpb=9f8c43e222feb88f18597e42ab0512fda483d46d;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php index e0e61df8..7d6a300f 100644 --- a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php @@ -17,6 +17,37 @@ class PocketControllerTest extends WallabagCoreTestCase $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); } + public function testImportPocketWithRabbitEnabled() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 1); + + $crawler = $client->request('GET', '/import/pocket'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); + + $client->getContainer()->get('craue_config')->set('import_with_rabbitmq', 0); + } + + public function testImportPocketWithRedisEnabled() + { + $this->checkRedis(); + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->getContainer()->get('craue_config')->set('import_with_redis', 1); + + $crawler = $client->request('GET', '/import/pocket'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); + + $client->getContainer()->get('craue_config')->set('import_with_redis', 0); + } + public function testImportPocketAuthBadToken() { $this->logInAs('admin');