self::
assertSame(['my_group'
],
$cConstraint->groups
);
self::
assertSame('some attached data',
$cConstraint->payload
);
[$dConstraint] =
$metadata->properties
['d'
]->
getConstraints();
self::
assertSame('intval',
$dConstraint->normalizer
);
} public function testInvalidNormalizerThrowsException() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('The "normalizer" option must be a valid callable ("string" given).'
);
new Unique(['normalizer' => 'Unknown Callable'
]);
} public function testInvalidNormalizerObjectThrowsException() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('The "normalizer" option must be a valid callable ("stdClass" given).'
);
new Unique(['normalizer' =>
new \
stdClass()]);
}}class UniqueDummy{