Skip to content

Commit 15e914c

Browse files
committed
render integer types with grouping as text input
1 parent bd0bd5f commit 15e914c

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Tests/Extension/AbstractBootstrap3LayoutTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,22 @@ public function testInteger()
18631863
);
18641864
}
18651865

1866+
public function testIntegerTypeWithGroupingRendersAsTextInput()
1867+
{
1868+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\IntegerType', 123, [
1869+
'grouping' => true,
1870+
]);
1871+
1872+
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
1873+
'/input
1874+
[@type="text"]
1875+
[@name="name"]
1876+
[@class="my&class form-control"]
1877+
[@value="123"]
1878+
'
1879+
);
1880+
}
1881+
18661882
public function testLanguage()
18671883
{
18681884
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\LanguageType', 'de');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/asset": "~2.8|~3.0|~4.0",
2424
"symfony/dependency-injection": "~2.8|~3.0|~4.0",
2525
"symfony/finder": "~2.8|~3.0|~4.0",
26-
"symfony/form": "^3.4.22|~4.1.11|^4.2.3",
26+
"symfony/form": "^3.4.23|^4.2.4",
2727
"symfony/http-foundation": "^3.3.11|~4.0",
2828
"symfony/http-kernel": "~3.2|~4.0",
2929
"symfony/polyfill-intl-icu": "~1.0",

0 commit comments

Comments
 (0)