Skip to content

Commit 72b3a65

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Cache] fix catching auth errors Fix CS [FrameworkBundle] set default session.handler alias if handler_id is not provided Fix CS Readability update Fix checks for phpunit releases on Composer 2 (resolves #37601) [SCA] Minor fixes on tests
2 parents c18354d + fc66039 commit 72b3a65

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Tests/FormTest.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,25 +170,28 @@ public function testMultiValuedFields()
170170
');
171171

172172
$this->assertEquals(
173-
array_keys($form->all()),
174-
['foo[2]', 'foo[3]', 'bar[foo][0]', 'bar[foo][foobar]']
173+
['foo[2]', 'foo[3]', 'bar[foo][0]', 'bar[foo][foobar]'],
174+
array_keys($form->all())
175175
);
176176

177-
$this->assertEquals($form->get('foo[2]')->getValue(), 'foo');
178-
$this->assertEquals($form->get('foo[3]')->getValue(), 'foo');
179-
$this->assertEquals($form->get('bar[foo][0]')->getValue(), 'foo');
180-
$this->assertEquals($form->get('bar[foo][foobar]')->getValue(), 'foo');
177+
$this->assertEquals('foo', $form->get('foo[2]')->getValue());
178+
$this->assertEquals('foo', $form->get('foo[3]')->getValue());
179+
$this->assertEquals('foo', $form->get('bar[foo][0]')->getValue());
180+
$this->assertEquals('foo', $form->get('bar[foo][foobar]')->getValue());
181181

182182
$form['foo[2]'] = 'bar';
183183
$form['foo[3]'] = 'bar';
184184

185-
$this->assertEquals($form->get('foo[2]')->getValue(), 'bar');
186-
$this->assertEquals($form->get('foo[3]')->getValue(), 'bar');
185+
$this->assertEquals('bar', $form->get('foo[2]')->getValue());
186+
$this->assertEquals('bar', $form->get('foo[3]')->getValue());
187187

188188
$form['bar'] = ['foo' => ['0' => 'bar', 'foobar' => 'foobar']];
189189

190-
$this->assertEquals($form->get('bar[foo][0]')->getValue(), 'bar');
191-
$this->assertEquals($form->get('bar[foo][foobar]')->getValue(), 'foobar');
190+
$this->assertEquals('bar', $form->get('bar[foo][0]')->getValue());
191+
$this->assertEquals(
192+
'foobar',
193+
$form->get('bar[foo][foobar]')->getValue()
194+
);
192195
}
193196

194197
/**
@@ -979,7 +982,7 @@ public function testGetPhpValuesWithEmptyTextarea()
979982

980983
$nodes = $dom->getElementsByTagName('form');
981984
$form = new Form($nodes->item(0), 'http://example.com');
982-
$this->assertEquals($form->getPhpValues(), ['example' => '']);
985+
$this->assertEquals(['example' => ''], $form->getPhpValues());
983986
}
984987

985988
public function testGetReturnTypes()

0 commit comments

Comments
 (0)