diff options
author | Jeremy <jeremy.benoist@gmail.com> | 2015-03-29 10:53:10 +0200 |
---|---|---|
committer | Jeremy <jeremy.benoist@gmail.com> | 2015-04-01 21:59:12 +0200 |
commit | 769e19dc4ab1a068e8165a7b237f42a78a6d312f (patch) | |
tree | 8fcb164704dd75a6108db0792c02f4ef6a7e1722 /src/Wallabag/CoreBundle/Tests/WallabagTestCase.php | |
parent | e3c34bfc06f3ea266a418d6246560f15d3f73e2a (diff) | |
download | wallabag-769e19dc4ab1a068e8165a7b237f42a78a6d312f.tar.gz wallabag-769e19dc4ab1a068e8165a7b237f42a78a6d312f.tar.zst wallabag-769e19dc4ab1a068e8165a7b237f42a78a6d312f.zip |
Move API stuff in ApiBundle
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/WallabagTestCase.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/WallabagTestCase.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php b/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php deleted file mode 100644 index 22016d8e..00000000 --- a/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Tests; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||
6 | |||
7 | abstract class WallabagTestCase extends WebTestCase | ||
8 | { | ||
9 | private $client = null; | ||
10 | |||
11 | public function getClient() | ||
12 | { | ||
13 | return $this->client; | ||
14 | } | ||
15 | |||
16 | public function setUp() | ||
17 | { | ||
18 | $this->client = static::createClient(); | ||
19 | } | ||
20 | |||
21 | public function logInAs($username) | ||
22 | { | ||
23 | $crawler = $this->client->request('GET', '/login'); | ||
24 | $form = $crawler->filter('button[type=submit]')->form(); | ||
25 | $data = array( | ||
26 | '_username' => $username, | ||
27 | '_password' => 'mypassword', | ||
28 | ); | ||
29 | |||
30 | $this->client->submit($form, $data); | ||
31 | } | ||
32 | } | ||