->get('form.csrf_provider') ->generateCsrfToken('unknown'); $client->request('POST', '/experts', array( 'form' => array( 'firstName' => 'Benjamin', 'lastName' => 'Grandfond', 'username' => 'benjaming', '_token' => $csrfToken, ) )); $this->assertEquals(302, $client->getResponse()->getStatusCode()); $crawler = $client->followRedirect(); $this->assertEquals(200, $client->getResponse()->getStatusCode()); $this->assertRegExp('~Benjamin~', $crawler->filter('li')->text()); } 61 Tester l’existant TIP ✘ sauvegarde d’un nouvel expert