$this->serverParams->contentLength =
$contentLength;
$this->serverParams->postMaxSize =
$iniMax;
$options =
['post_max_size_message' => 'Max {{ max }}!'
];
$form =
$this->factory->
createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null,
$options);
$this->
setRequestData('POST',
[],
[]);
$this->requestHandler->
handleRequest($form,
$this->request
);
if ($shouldFail) { $error =
new FormError($options['post_max_size_message'
], null,
$errorParams);
$error->
setOrigin($form);
$this->
assertEquals([$error],
iterator_to_array($form->
getErrors()));
$this->
assertTrue($form->
isSubmitted());
} else { $this->
assertCount(0,
$form->
getErrors());
$this->
assertFalse($form->
isSubmitted());
} } public static function getPostMaxSizeFixtures() {