From 7019c7cf6c6af39c0f458769e20c3f9306477943 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 31 Dec 2015 11:24:46 +0100 Subject: Add tagged services for import - list services in /import - add url to import service - ImportBundle routing are now prefixed by /import - optimize flush in each import (flushing each 20 contents) - improve design of each import - add more tests --- .../Tests/Controller/ImportControllerTest.php | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php (limited to 'src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php') diff --git a/src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php new file mode 100644 index 00000000..30009af4 --- /dev/null +++ b/src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php @@ -0,0 +1,29 @@ +getClient(); + + $client->request('GET', '/import/'); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + $this->assertContains('login', $client->getResponse()->headers->get('location')); + } + + public function testImportList() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/import/'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals(2, $crawler->filter('blockquote')->count()); + } +} -- cgit v1.2.3