@dataProvider getAnnotationVarTypeArrayProviderInvalid
public function testAnnotationWithAttributesWithVarTypeArrayError($attribute, $type, $value, $given) {
$parser = $this
->createTestParser();
$context = 'property SomeClassName::invalidProperty.';
$docblock = sprintf('@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes(%s = %s)', $attribute, $value);
$parser
->setTarget(Target::TARGET_PROPERTY);
try {
$parser
->parse($docblock, $context);
$this
->fail();
} catch (\Doctrine\Common\Annotations\AnnotationException $exc) {
$this
->assertContains("[Type Error] Attribute \"{$attribute}\" of @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationWithAttributes declared on property SomeClassName::invalidProperty. expects either a(n) {$type}, or an array of {$type}s, but got {$given}.", $exc
->getMessage());
}
}