Skip to content

Commit

Permalink
add test using deprecated reflection doc block feature to legacy group
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Mar 21, 2024
1 parent 79209ee commit f3e4b84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Tests/Extractor/PhpDocExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static function invalidTypesProvider()
return [
'pub' => ['pub', null, null],
'stat' => ['stat', null, null],
'foo' => ['foo', self::isPhpDocumentorV5() ? 'Foo.' : null, null],
'bar' => ['bar', self::isPhpDocumentorV5() ? 'Bar.' : null, null],
];
}
Expand All @@ -73,6 +72,16 @@ public function testInvalid($property, $shortDescription, $longDescription)
$this->assertSame($longDescription, $this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', $property));
}

/**
* @group legacy
*/
public function testEmptyParamAnnotation()
{
$this->assertNull($this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
$this->assertSame(self::isPhpDocumentorV5() ? 'Foo.' : null, $this->extractor->getShortDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
$this->assertNull($this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
}

/**
* @dataProvider typesWithNoPrefixesProvider
*/
Expand Down

0 comments on commit f3e4b84

Please sign in to comment.