Added test case for checking that 'NaN' string converts into TransformationFailedException in NumberToLocalizedStringTransformer
This commit is contained in:
parent
4b19034c6f
commit
aaa9de6563
@ -123,4 +123,15 @@ class NumberToLocalizedStringTransformerTest extends LocalizedTestCase
|
|||||||
|
|
||||||
$transformer->reverseTransform('foo');
|
$transformer->reverseTransform('foo');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException Symfony\Component\Form\Exception\TransformationFailedException
|
||||||
|
* @link https://github.com/symfony/symfony/issues/3161
|
||||||
|
*/
|
||||||
|
public function testReverseTransformExpectsValidNumberFromNan()
|
||||||
|
{
|
||||||
|
$transformer = new NumberToLocalizedStringTransformer();
|
||||||
|
|
||||||
|
$transformer->reverseTransform('NaN');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user