public function IssnValidatorTest::testRequireHyphenIssns in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\IssnValidatorTest::testRequireHyphenIssns()
@dataProvider getValidNonHyphenatedIssn
File
- vendor/
symfony/ validator/ Tests/ Constraints/ IssnValidatorTest.php, line 144
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testRequireHyphenIssns($issn) {
$constraint = new Issn(array(
'requireHyphen' => true,
'message' => 'myMessage',
));
$this->validator
->validate($issn, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ value }}', '"' . $issn . '"')
->setCode(Issn::MISSING_HYPHEN_ERROR)
->assertRaised();
}