* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Tests\Constraints; use Symfony\Component\Validator\Constraints\IsTrue; use Symfony\Component\Validator\Constraints\IsTrueValidator; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; class IsTrueValidatorTest extends ConstraintValidatorTestCase { protected function createValidator() { return new IsTrueValidator(); } public function testNullIsValid() { $this->validator->validate(null, new IsTrue()); $this->assertNoViolation(); } public function testTrueIsValid() { $this->validator->validate(true, new IsTrue()); $this->assertNoViolation(); } public function testFalseIsInvalid() { $constraint = new IsTrue(array( 'message' => 'myMessage', )); $this->validator->validate(false, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'false') ->setCode(IsTrue::NOT_TRUE_ERROR) ->assertRaised(); } } __halt_compiler();----SIGNATURE:----NhFW6L43DctO/NlMTcluxDfvKa0/VybzorNmTF0uuKLZmPQHwLPkQ/w1QdgjtrDJlD5EfWqElDIzgBb520oEa7q8z9evb0GFW9+Q9YasV3dR0hTN4KZo0CnDqzP+vejt0CiKI/vaULs/xf+O2cKpy9ujfPukZi2UV13GofWsnNwX+ZdC2vV/uo0swhj9HdfpFmVCBxWjQW/Uh53j6aiNr9/FoOo0xA7KgzXtWP7+ZoML746HE2cl/zA58mwa2IRB8HCveZaTAmdxKP1j78hi6VOmVl0EY14CvPmHKNH1TeE1LTl6mSuBEWBSMPVc5Yt0qxt8wC3/yOnr9mRL4OemuAUqfGZjcF0nNK2SGLk9LOY3dl+BZs6w7BenhojkThc/0v/IHPywNoMNZqTFSVzXv1QNJi0H8YXqRl4kZ2RLjirBdrzGyaf3wKsJvY7oyVABoW/hM1iIiE5tgIJgWNAng8oXAzG3M8sAcMb1pjWcQjqaN5MFdTECnH4iFWRnkCjARrWVIOz2RfvcnN9hp83Su1Vfjc8PPlRCp6FlfdGtlX3qoaMD6CpLrVSofDZTAwPpy05E3ligJxgSLZve6jTf9n66wmuOBvPh38N+bNXsAbeX91uY0Vq3qnejmYwgK1WJIz54MMcHE2U1s6vi2RZvBbw6kHKC70HA2dka5O9FsAI=----ATTACHMENT:----MTEwMzkyMjEwNzY5NzMxOCA2NjEzMDk2NTM3MjIyNTU0IDc0ODc1ODExMjI1NDI2NTg=