reverseTransform() public méthode

Transforms a localized number into an integer or float
public reverseTransform ( string $value, $originalValue )
$value string
 /**
  * Transforms a localized money string into a normalized format.
  *
  * @param string $value Localized money string
  * @return number Normalized number
  */
 public function reverseTransform($value, $originalValue)
 {
     $value = parent::reverseTransform($value, $originalValue);
     if (null !== $value) {
         $value *= $this->getOption('divisor');
     }
     return $value;
 }
 public function testReverseTransformExpectsString()
 {
     $transformer = new NumberToLocalizedStringTransformer();
     $this->setExpectedException('Symfony\\Component\\Form\\Exception\\UnexpectedTypeException');
     $transformer->reverseTransform(1, null);
 }
 /**
  * Transforms a localized money string into a normalized format.
  *
  * @param string $value Localized money string
  * @return number Normalized number
  */
 public function reverseTransform($value, $originalValue)
 {
     return parent::reverseTransform($value) * $this->getOption('divisor');
 }
 public function testReverseTransformExpectsString()
 {
     $transformer = new NumberToLocalizedStringTransformer();
     $this->setExpectedException('\\InvalidArgumentException');
     $transformer->reverseTransform(1);
 }