From 769e19dc4ab1a068e8165a7b237f42a78a6d312f Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 29 Mar 2015 10:53:10 +0200 Subject: Move API stuff in ApiBundle --- .../CoreBundle/Tests/WallabagCoreTestCase.php | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php (limited to 'src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php') 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 @@ +client; + } + + public function setUp() + { + $this->client = static::createClient(); + } + + public function logInAs($username) + { + $crawler = $this->client->request('GET', '/login'); + $form = $crawler->filter('button[type=submit]')->form(); + $data = array( + '_username' => $username, + '_password' => 'mypassword', + ); + + $this->client->submit($form, $data); + } +} -- cgit v1.2.3