[TESTS] Fix tests

This commit is contained in:
2022-10-19 22:39:17 +01:00
parent 2fd46ca886
commit 053bc38792
12 changed files with 89 additions and 50 deletions

View File

@@ -61,20 +61,22 @@ class FormTest extends GNUsocialTestCase
$form_class = $config->getType()->getInnerType();
$found = false;
foreach ($form_array as [$array_name, $array_class, $options]) {
if ($name === $array_name) {
$found = true;
static::assertSame(\get_class($form_class), $array_class);
foreach (['label', 'attr', 'data'] as $field) {
if (isset($options[$field])) {
static::assertSame($form_options[$field], $options[$field]);
if ($name !== '_next') {
$found = false;
foreach ($form_array as [$array_name, $array_class, $options]) {
if ($name === $array_name) {
$found = true;
static::assertSame(\get_class($form_class), $array_class);
foreach (['label', 'attr', 'data'] as $field) {
if (isset($options[$field])) {
static::assertSame($form_options[$field], $options[$field]);
}
}
break;
}
break;
}
static::assertTrue($found);
}
static::assertTrue($found);
static::assertSame(\get_class($f->getParent()), 'Symfony\\Component\\Form\\Form');
}