aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-08 23:05:51 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-08 23:13:40 +0100
commit3b815d2de5a852fe2ebad5827bd4c9070aa175ea (patch)
tree504e54ecfd8ae6203f76a19a910e5e6c5dee1c3e /src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
parentd91691573f108422cc2080462af35ebd62dc93fb (diff)
downloadwallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.tar.gz
wallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.tar.zst
wallabag-3b815d2de5a852fe2ebad5827bd4c9070aa175ea.zip
Add some fixtures
Improve test, so user can login Fix some leftJoin Cleanup EntryController
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/WallabagTestCase.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/WallabagTestCase.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php b/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
new file mode 100644
index 00000000..5f092318
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Wallabag\CoreBundle\Tests;
4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6use Symfony\Component\BrowserKit\Cookie;
7use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
8
9class WallabagTestCase extends WebTestCase
10{
11 private $client = null;
12
13 public function getClient()
14 {
15 return $this->client;
16 }
17
18 public function setUp()
19 {
20 $this->client = static::createClient();
21 }
22
23 public function logIn()
24 {
25 $crawler = $this->client->request('GET', '/login');
26 $form = $crawler->filter('button[type=submit]')->form();
27 $data = array(
28 '_username' => 'admin',
29 '_password' => 'test',
30 );
31
32 $this->client->submit($form, $data);
33 }
34}