mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 02:51:04 +00:00
33 lines
655 B
PHP
33 lines
655 B
PHP
|
<?php
|
||
|
|
||
|
namespace Wallabag\CoreBundle\Tests;
|
||
|
|
||
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||
|
|
||
|
class WallabagTestCase extends WebTestCase
|
||
|
{
|
||
|
private $client = null;
|
||
|
|
||
|
public function getClient()
|
||
|
{
|
||
|
return $this->client;
|
||
|
}
|
||
|
|
||
|
public function setUp()
|
||
|
{
|
||
|
$this->client = static::createClient();
|
||
|
}
|
||
|
|
||
|
public function logIn()
|
||
|
{
|
||
|
$crawler = $this->client->request('GET', '/login');
|
||
|
$form = $crawler->filter('button[type=submit]')->form();
|
||
|
$data = array(
|
||
|
'_username' => 'admin',
|
||
|
'_password' => 'test',
|
||
|
);
|
||
|
|
||
|
$this->client->submit($form, $data);
|
||
|
}
|
||
|
}
|