add a test case

This commit is contained in:
Christian Flothmann 2018-11-28 11:07:27 +01:00
parent d903dcbac5
commit 85af682834

View File

@ -514,24 +514,24 @@ class NumberToLocalizedStringTransformerTest extends TestCase
/** /**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
* @dataProvider nanRepresentationProvider
* *
* @see https://github.com/symfony/symfony/issues/3161 * @see https://github.com/symfony/symfony/issues/3161
*/ */
public function testReverseTransformDisallowsNaN() public function testReverseTransformDisallowsNaN($nan)
{ {
$transformer = new NumberToLocalizedStringTransformer(); $transformer = new NumberToLocalizedStringTransformer();
$transformer->reverseTransform('NaN'); $transformer->reverseTransform($nan);
} }
/** public function nanRepresentationProvider()
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
public function testReverseTransformDisallowsNaN2()
{ {
$transformer = new NumberToLocalizedStringTransformer(); return array(
array('nan'),
$transformer->reverseTransform('nan'); array('NaN'), // see https://github.com/symfony/symfony/issues/3161
array('NAN'),
);
} }
/** /**