diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index 82c906bbaf528..1cf44f65965c6 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -48,11 +48,13 @@ public function testParamTagTypeIsOmitted() public function invalidTypesProvider() { + $phpDocumentorV5 = class_exists('\phpDocumentor\Reflection\DocBlock\Tags\InvalidTag'); + return [ 'pub' => ['pub', null, null], 'stat' => ['stat', null, null], - 'foo' => ['foo', 'Foo.', null], - 'bar' => ['bar', 'Bar.', null], + 'foo' => ['foo', $phpDocumentorV5 ? 'Foo.' : null, null], + 'bar' => ['bar', $phpDocumentorV5 ? 'Bar.' : null, null], ]; } @@ -78,6 +80,8 @@ public function testExtractTypesWithNoPrefixes($property, array $type = null) public function typesProvider() { + $phpDocumentorV5 = class_exists('\phpDocumentor\Reflection\DocBlock\Tags\InvalidTag'); + return [ ['foo', null, 'Short description.', 'Long description.'], ['bar', [new Type(Type::BUILTIN_TYPE_STRING)], 'This is bar', null], @@ -114,7 +118,7 @@ public function typesProvider() ['donotexist', null, null, null], ['staticGetter', null, null, null], ['staticSetter', null, null, null], - ['emptyVar', null, 'This should not be removed.', null], + ['emptyVar', null, $phpDocumentorV5 ? 'This should not be removed.' : null, null], ]; }