/** * @ZF-8919 * @dataProvider enLocaleStringsProvider */ public function testPhpLocaleEnStringType($float, $expected) { $valid = new FloatValidator(array('locale' => 'en_US')); $this->assertEquals($expected, $valid->isValid($float)); }
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; }