diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-07 22:15:08 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-07 22:15:08 +0100 |
commit | 39643c6b76d92d509b1af0228b6379d7fdce8a1c (patch) | |
tree | 931dceef7dbc8ae9911d01ded709d558417a6cdd /src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php | |
parent | 488a468e3e11ff0ab6284afe232bf0f7fa68a8eb (diff) | |
parent | b88cf91fc8371194df78e690983c61ea94f266cd (diff) | |
download | wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.tar.gz wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.tar.zst wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.zip |
Merge pull request #1493 from wallabag/v2-pocket-import2.0.0-alpha.1
v2 – 1st draft for Pocket import via API & Wallabag v1 import
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Tests\Controller; | ||
4 | |||
5 | use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | ||
6 | |||
7 | class ImportControllerTest extends WallabagCoreTestCase | ||
8 | { | ||
9 | public function testLogin() | ||
10 | { | ||
11 | $client = $this->getClient(); | ||
12 | |||
13 | $client->request('GET', '/import/'); | ||
14 | |||
15 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); | ||
16 | $this->assertContains('login', $client->getResponse()->headers->get('location')); | ||
17 | } | ||
18 | |||
19 | public function testImportList() | ||
20 | { | ||
21 | $this->logInAs('admin'); | ||
22 | $client = $this->getClient(); | ||
23 | |||
24 | $crawler = $client->request('GET', '/import/'); | ||
25 | |||
26 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
27 | $this->assertEquals(2, $crawler->filter('blockquote')->count()); | ||
28 | } | ||
29 | } | ||