You are here

public function IsbnValidatorTest::testInvalidIsbn13 in Plug 7

@dataProvider getInvalidIsbn13

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php, line 201

Class

IsbnValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidIsbn13($isbn, $code) {
  $constraint = new Isbn(array(
    'type' => 'isbn13',
    'isbn13Message' => 'myMessage',
  ));
  $this->validator
    ->validate($isbn, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $isbn . '"')
    ->setCode($code)
    ->assertRaised();
}