* * 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\NotNull; use Symfony\Component\Validator\Constraints\NotNullValidator; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; class NotNullValidatorTest extends ConstraintValidatorTestCase { protected function createValidator() { return new NotNullValidator(); } /** * @dataProvider getValidValues */ public function testValidValues($value) { $this->validator->validate($value, new NotNull()); $this->assertNoViolation(); } public function getValidValues() { return array( array(0), array(false), array(true), array(''), ); } public function testNullIsInvalid() { $constraint = new NotNull(array( 'message' => 'myMessage', )); $this->validator->validate(null, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'null') ->setCode(NotNull::IS_NULL_ERROR) ->assertRaised(); } } __halt_compiler();----SIGNATURE:----gfjKDiJ3NK3IURXhRvLl6ccxIGZqS++PQ9LVvhbDuYW+yW6dRunEcDzeS8Dsa3xKgsQVFV7iBrKLGySUeDIq3Oc+s2vKDayWG2IWxn28i9sOA8XmdaA274e1QwcvnYk9w7m13/hGMfHEKxFdbEl/644roX+fUWJGegm+smDu0vsCxdqKW/PT7+iwD2pRtaZ4NMCz+PHU0KTtbSDEPO2kuGOwaLPLBud71PuIyOAXKRaFdCYrGvV4PB3JPVCOWKxIgz+78DDXcs4U5GUnLi5pAkgjoIchsNlfNjT7Ew8nLLjvj6GNs2vuTDAmpfyfIgmVdmBCUkunsHVcTpOTRlchmBwFhcEXFYNESwNy/cs5Z3Z3IV9OpiF9C75unS8jU2ACdtlGd2SwGqdu7S0qfCorccOjTTIvcv/7Aaj1vTP4w2QSS8IGb3+n4ZYUFlP6qmM8nYSFy7X8mtf2MKFj/i07EQ0LoB3mJJvAYuVDpAYz97uRqW1XKGWC/vM15PuriuwT0nVYq2fJ9k1vJ157uppRONH83gedlAs4uz2jYZVMDMcbwnRXwyrkGfkg4bdd16hyamxWOGob7UKdihIBGeMMpOOoY2IZn6tettvVRqBzYOI57Q9v2W+P3rCOEOufBXY1qgQdBwSuyq61yKIN+AMmWFGm5m2oIWUal91MMgEmMJ8=----ATTACHMENT:----ODM4NjMxMjg1OTA3NjYzNyA2ODU1NzU2ODAwMjExNDk1IDc2MzQwNTEyNDcwNTYyMTg=