データベースでユーザーを更新できる updateAction をテストしようとしていますが、テスト方法がわかりません... データベースにユーザーを追加する createAction のテストに成功しました。したがって、これを更新するために作成したばかりのユーザーIDを取得したいと思います。
これは私の関数 testCreate です:
public function testCreate()
{
$crawler = $this->client->request('GET', '/admin/user/new');
$buttonCrawlerNode = $crawler->selectButton('submit');
$form = $buttonCrawlerNode->form(array(
'myapp_usertype[email]' => 'testadd@gmail.fr',
'myapp_usertype[role]' => 'ROLE_USER',
'myapp_usertype[password][first]' => 'test',
'myapp_usertype[password][second]' => 'test',
));
$this->client->submit($form);
}