Replace search link on main page to point to chill_main_search and fix tests

This commit is contained in:
2014-11-25 15:07:02 +01:00
parent 51d6bed43d
commit fc955e2995
4 changed files with 15 additions and 7 deletions

View File

@@ -9,13 +9,21 @@ class LoginControllerTest extends WebTestCase
{
public function testLogin()
{
$client = static::createClient();
$client = static::createClient(array(
'framework' => array(
'default_locale' => 'en',
'translator' => array(
'fallback' => 'en'
)
),
));
//load login page and submit form
$crawler = $client->request('GET', '/login');
$this->assertTrue($client->getResponse()->isSuccessful());
$buttonCrawlerNode = $crawler->selectButton('Login');
$buttonCrawlerNode = $crawler->selectButton('login');
$form = $buttonCrawlerNode->form();
$client->submit($form, array(
@@ -40,7 +48,7 @@ class LoginControllerTest extends WebTestCase
$logoutLinkFilter = $crawler->filter('a:contains("Logout")');
//check there is > 0 logout link
$this->assertGreaterThan(0, $logoutLinkFilter->count());
$this->assertGreaterThan(0, $logoutLinkFilter->count(), 'check that a logout link is present');
//click on logout link
$client->followRedirects(false);

View File

@@ -7,8 +7,8 @@ framework:
form: true
csrf_protection: true
session: ~
default_locale: fr
translator: { fallback: fr }
default_locale: en
translator: { fallback: en }
profiler: { only_exceptions: false }
templating:
engines: ['twig']