Example #1
0
 /**
  * @ZF-8919
  * @dataProvider enLocaleStringsProvider
  */
 public function testPhpLocaleEnStringType($float, $expected)
 {
     $valid = new FloatValidator(array('locale' => 'en_US'));
     $this->assertEquals($expected, $valid->isValid($float));
 }
Example #2
0
 public function getFloatValidator()
 {
     if ($this->floatValidator === NULL) {
         $validator = new Float();
         $validator->setOptions(array())->setMessages(array(Float::INVALID => $this->getErrorMessage('FLOAT::INVALID'), Float::NOT_FLOAT => $this->getErrorMessage('FLOAT::NOT_FLOAT')));
         $this->setFloatValidator($validator);
     }
     return $this->floatValidator;
 }