aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-06-01 15:49:49 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-06-01 15:49:49 +0200
commit2878416f8b4d94fb5e64c2fa61861526a7654d3d (patch)
treecbdf2d95ecdb651e2003747a28572c35b6c9da64 /src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
parent98510a4189186c8dcc3f1bf38843d935ed3d1859 (diff)
parent4346a86068781f4acdeb574d7e2af08b77b58ea7 (diff)
downloadwallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.tar.gz
wallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.tar.zst
wallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.zip
Merge pull request #1167 from wallabag/v2-api-bundle
Move API stuff in ApiBundle
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php b/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
new file mode 100644
index 00000000..e5096528
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Wallabag\CoreBundle\Tests;
4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7abstract class WallabagCoreTestCase 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}