/** * @dataProvider getInvalidFormats */ public function testInvalidFormat($string, $format) { $validator = new Format(); $schema = new \stdClass(); $schema->format = $format; $validator->check($string, $schema); $this->assertEquals(1, count($validator->getErrors()), 'Expected 1 error'); }
protected function checkFormat($value, $schema = null, $path = null, $i = null) { $validator = new Format($this->checkMode, $this->uriRetriever); $validator->check($value, $schema, $path, $i); $this->addErrors($validator->getErrors()); }