public function testPagesUserWithCorrectCredentials() { $client = static::createClient(); $client->setMaxRedirects(2); $crawler = $client->request('GET', '/private/en/authentication'); self::assertEquals(200, $client->getResponse()->getStatusCode()); $form = $crawler->selectButton('login')->form(); $this->submitForm($client, $form, array('form' => 'authenticationIndex', 'backend_email' => '[email protected]', 'backend_password' => 'fork', 'form_token' => $form['form_token']->getValue())); self::assertContains('Now editing', $client->getResponse()->getContent()); // logout to get rid of this session $client->followRedirects(false); $client->request('GET', '/private/en/authentication/logout'); }