public function IsbnValidatorTest::testInvalidIsbn10 in Plug 7
@dataProvider getInvalidIsbn10
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ IsbnValidatorTest.php, line 171
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testInvalidIsbn10($isbn, $code) {
$constraint = new Isbn(array(
'type' => 'isbn10',
'isbn10Message' => 'myMessage',
));
$this->validator
->validate($isbn, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ value }}', '"' . $isbn . '"')
->setCode($code)
->assertRaised();
}