public function DocParserTest::testSetValuesException in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::testSetValuesException()
- 9 core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::testSetValuesException()
File
- core/
tests/ Drupal/ Tests/ Component/ Annotation/ Doctrine/ DocParserTest.php, line 1192
Class
- DocParserTest
- @coversDefaultClass \Drupal\Component\Annotation\Doctrine\DocParser
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');
}