add a test case

This commit is contained in:
Christian Flothmann 2018-11-28 11:07:27 +01:00
parent d903dcbac5
commit 85af682834
1 changed files with 9 additions and 9 deletions

View File

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