protected function setUp(): void
{ $this->tokenManager =
$this->
createMock(CsrfTokenManagerInterface::
class);
parent::
setUp();
} protected function getExtensions() { return array_merge(parent::
getExtensions(),
[ new CsrfExtension($this->tokenManager,
new IdentityTranslator()),
]);
} public function testCsrfProtectionByDefaultIfRootAndCompound() { $view =
$this->factory
->
create('Symfony\Component\Form\Extension\Core\Type\FormType', null,
[ 'csrf_field_name' => 'csrf',
'compound' => true,
]) ->
createView();