Skip to content

Commit c0aa374

Browse files
Fix tests
1 parent 6eaee61 commit c0aa374

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Tests/AbstractLayoutTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests;
1313

1414
use PHPUnit\Framework\SkippedTestError;
15+
use Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer;
1516
use Symfony\Component\Form\Extension\Core\Type\PercentType;
1617
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
1718
use Symfony\Component\Form\Extension\Csrf\CsrfExtension;
@@ -1923,7 +1924,7 @@ public function testPasswordWithMaxLength()
19231924

19241925
public function testPercent()
19251926
{
1926-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PercentType', 0.1);
1927+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\PercentType', 0.1, ['rounding_mode' => PercentToLocalizedStringTransformer::ROUND_CEILING]);
19271928

19281929
$this->assertWidgetMatchesXpath($form->createView(), [],
19291930
'/input
@@ -1939,7 +1940,7 @@ public function testPercentNoSymbol()
19391940
{
19401941
$this->requiresFeatureSet(403);
19411942

1942-
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => false]);
1943+
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => false, 'rounding_mode' => PercentToLocalizedStringTransformer::ROUND_CEILING]);
19431944
$this->assertWidgetMatchesXpath($form->createView(), [],
19441945
'/input
19451946
[@type="text"]
@@ -1954,7 +1955,7 @@ public function testPercentCustomSymbol()
19541955
{
19551956
$this->requiresFeatureSet(403);
19561957

1957-
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => '']);
1958+
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => '', 'rounding_mode' => PercentToLocalizedStringTransformer::ROUND_CEILING]);
19581959
$this->assertWidgetMatchesXpath($form->createView(), [],
19591960
'/input
19601961
[@type="text"]

0 commit comments

Comments
 (0)