fix tests
This commit is contained in:
parent
39aab260d4
commit
6d0195f3cd
@ -42,6 +42,11 @@ class DebugCommandTest extends TestCase
|
|||||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||||
$this->assertSame(<<<TXT
|
$this->assertSame(<<<TXT
|
||||||
|
|
||||||
|
Built-in form types (Symfony\Component\Form\Extension\Core\Type)
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
PercentType
|
||||||
|
|
||||||
Service form types
|
Service form types
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class PercentToLocalizedStringTransformerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testReverseTransformWithScaleAndRoundingDisabled()
|
public function testReverseTransformWithScaleAndRoundingDisabled()
|
||||||
{
|
{
|
||||||
$this->expectDeprecation('Since symfony/form 5.1: Not passing a rounding mode to Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::__construct() is deprecated. Starting with Symfony 6.0 it will default to Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP.');
|
$this->expectDeprecation('Since symfony/form 5.1: Not passing a rounding mode to Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::__construct() is deprecated. Starting with Symfony 6.0 it will default to "Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP".');
|
||||||
|
|
||||||
$transformer = new PercentToLocalizedStringTransformer(2, PercentToLocalizedStringTransformer::FRACTIONAL);
|
$transformer = new PercentToLocalizedStringTransformer(2, PercentToLocalizedStringTransformer::FRACTIONAL);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class PercentTypeTest extends TypeTestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitWithoutRoundingMode()
|
public function testSubmitWithoutRoundingMode()
|
||||||
{
|
{
|
||||||
$this->expectDeprecation('Since symfony/form 5.1: Not configuring the "rounding_mode" option is deprecated. It will default to Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP in Symfony 6.0.');
|
$this->expectDeprecation('Since symfony/form 5.1: Not configuring the "rounding_mode" option is deprecated. It will default to "Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP" in Symfony 6.0.');
|
||||||
|
|
||||||
$form = $this->factory->create(self::TESTED_TYPE, null, [
|
$form = $this->factory->create(self::TESTED_TYPE, null, [
|
||||||
'scale' => 2,
|
'scale' => 2,
|
||||||
@ -55,7 +55,7 @@ class PercentTypeTest extends TypeTestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitWithNullRoundingMode()
|
public function testSubmitWithNullRoundingMode()
|
||||||
{
|
{
|
||||||
$this->expectDeprecation('Since symfony/form 5.1: Not configuring the "rounding_mode" option is deprecated. It will default to Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP in Symfony 6.0.');
|
$this->expectDeprecation('Since symfony/form 5.1: Not configuring the "rounding_mode" option is deprecated. It will default to "Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer::ROUND_HALF_UP" in Symfony 6.0.');
|
||||||
|
|
||||||
$form = $this->factory->create(self::TESTED_TYPE, null, [
|
$form = $this->factory->create(self::TESTED_TYPE, null, [
|
||||||
'rounding_mode' => null,
|
'rounding_mode' => null,
|
||||||
|
Reference in New Issue
Block a user