protected function getBuilder() { return new FormBuilder('post', null,
$this->dispatcher,
$this->factory,
['compound' => true
]);
} // https://github.com/symfony/symfony/pull/5838
public function testStringFormData() { $data = 'XP4HUzmHPi';
$event =
new FormEvent($this->form,
$data);
$validation =
new CsrfValidationListener('csrf',
$this->tokenManager, 'unknown', 'Invalid.'
);
$validation->
preSubmit($event);
// Validate accordingly
$this->
assertSame($data,
$event->
getData());
} public function testArrayCsrfToken() { $event =
new FormEvent($this->form,
['csrf' =>
[]]);
$validation =
new CsrfValidationListener('csrf',
$this->tokenManager, 'unknown', 'Invalid.'
);