Skip to content

Commit b47915c

Browse files
[Form] Fix forward compat of AbstractLayoutTest
1 parent 23590eb commit b47915c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Form/Tests/AbstractLayoutTest.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,11 @@ public function testWidgetAttributes()
24222422
$html = $this->renderWidget($form->createView());
24232423

24242424
// compare plain HTML to check the whitespace
2425-
$this->assertSame('<input type="text" id="text" name="text" readonly="readonly" disabled="disabled" required="required" maxlength="10" pattern="\d+" class="foobar" data-foo="bar" value="value" />', $html);
2425+
try {
2426+
$this->assertSame('<input type="text" id="text" name="text" readonly="readonly" disabled="disabled" required="required" maxlength="10" pattern="\d+" class="foobar" data-foo="bar" value="value" />', $html);
2427+
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
2428+
$this->assertSame('<input type="text" id="text" name="text" disabled="disabled" required="required" readonly="readonly" maxlength="10" pattern="\d+" class="foobar" data-foo="bar" value="value" />', $html);
2429+
}
24262430
}
24272431

24282432
public function testWidgetAttributeNameRepeatedIfTrue()

0 commit comments

Comments
 (0)