public function testGenerateCsrfTokenUsesFormNameAsIntentionByDefault()
{
$this->tokenManager->expects($this->once())
->method('getToken')
->with('FORM_NAME')
->will($this->returnValue('token'));
$view = $this->factory
->createNamed('FORM_NAME', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, array(
'csrf_field_name' => 'csrf',
'csrf_token_manager' => $this->tokenManager,
'compound' => true,
))
->createView();
$this->assertEquals('token', $view['csrf']->vars['value']);
}