]> git.immae.eu Git - github/wallabag/wallabag.git/blame_incremental - src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
Avoid multiple tag creation
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / WallabagCoreTestCase.php
... / ...
CommitLineData
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 parent::setUp();
19
20 $this->client = static::createClient();
21 }
22
23 public function logInAs($username)
24 {
25 $crawler = $this->client->request('GET', '/login');
26 $form = $crawler->filter('button[type=submit]')->form();
27 $data = array(
28 '_username' => $username,
29 '_password' => 'mypassword',
30 );
31
32 $this->client->submit($form, $data);
33 }
34}