class IsFalseValidatorTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\IsFalseValidatorTest
Hierarchy
- class \Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest extends \Symfony\Component\Validator\Tests\Constraints\PHPUnit_Framework_TestCase
- class \Symfony\Component\Validator\Tests\Constraints\IsFalseValidatorTest
Expanded class hierarchy of IsFalseValidatorTest
File
- vendor/
symfony/ validator/ Tests/ Constraints/ IsFalseValidatorTest.php, line 18
Namespace
Symfony\Component\Validator\Tests\ConstraintsView source
class IsFalseValidatorTest extends AbstractConstraintValidatorTest {
protected function getApiVersion() {
return Validation::API_VERSION_2_5;
}
protected function createValidator() {
return new IsFalseValidator();
}
public function testNullIsValid() {
$this->validator
->validate(null, new IsFalse());
$this
->assertNoViolation();
}
public function testFalseIsValid() {
$this->validator
->validate(false, new IsFalse());
$this
->assertNoViolation();
}
public function testTrueIsInvalid() {
$constraint = new IsFalse(array(
'message' => 'myMessage',
));
$this->validator
->validate(true, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ value }}', 'true')
->assertRaised();
}
}