/** * Ensures that the validator follows expected behavior * * @param string $value that will be tested * @param boolean $expected expected result of assertion * @param array $options fed into the validator before validation * @dataProvider basicProvider name of method that provide the above parameters * @return void */ public function testBasic($value, $expected, $options = array()) { $this->validator->setOptions($options); $this->assertEquals($expected, $this->validator->isValid($value), 'Failed expecting ' . $value . ' being ' . ($expected ? 'true' : 'false') . sprintf(" (locale:%s, dateType: %s, timeType: %s, pattern:%s)", $this->validator->getLocale(), $this->validator->getDateType(), $this->validator->getTimeType(), $this->validator->getPattern())); }