function DocParserTest::testSetValuesException
File
- 
              core/tests/ Drupal/ Tests/ Component/ Annotation/ Doctrine/ DocParserTest.php, line 1216 
Class
- DocParserTest
- @coversDefaultClass \Drupal\Component\Annotation\Doctrine\DocParser[[api-linebreak]]
Namespace
Drupal\Tests\Component\Annotation\DoctrineCode
public function testSetValuesException() {
  $this->expectException('\\Doctrine\\Common\\Annotations\\AnnotationException');
  $this->expectExceptionMessage('[Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name');
  $docblock = <<<DOCBLOCK
  /**
   * @SomeAnnotationClassNameWithoutConstructor(invalidaProperty = "Some val")
   */
  DOCBLOCK;
  $this->createTestParser()
    ->parse($docblock, 'some class');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
