Move API stuff in ApiBundle

This commit is contained in:
Jeremy
2015-03-29 10:53:10 +02:00
parent e3c34bfc06
commit 769e19dc4a
25 changed files with 571 additions and 297 deletions

View File

@ -0,0 +1,32 @@
<?php
namespace Wallabag\CoreBundle\Tests;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
abstract class WallabagCoreTestCase extends WebTestCase
{
private $client = null;
public function getClient()
{
return $this->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);
}
}