$expected->
addPropertyConstraint('firstName',
new AtLeastOneOf([ new NotNull(),
new Range(['min' => 3
]),
], null, null, 'foo', null, false
));
$expected->
addPropertyConstraint('firstName',
new Sequentially([ new NotBlank(),
new Range(['min' => 5
]),
]));
$expected->
addPropertyConstraint('childA',
new Valid());
$expected->
addPropertyConstraint('childB',
new Valid());
$expected->
addGetterConstraint('lastName',
new NotNull());
$expected->
addGetterMethodConstraint('valid', 'isValid',
new IsTrue());
$expected->
addGetterConstraint('permissions',
new IsTrue());
$expected->
addPropertyConstraint('other',
new Type('integer'
));
// load reflection class so that the comparison passes
$expected->
getReflectionClass();
$this->
assertEquals($expected,
$metadata);
} /**
* Test MetaData merge with parent annotation.
*/