Skip to content

Commit 46bcd87

Browse files
committed
Improved tests
1 parent dbb381a commit 46bcd87

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/UnitTest/PhpDocReader/Fixtures/Class1.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ class Class1
2525

2626
/**
2727
* @param $paramNone
28+
* @param $paramTypeHint
2829
* @param \UnitTest\PhpDocReader\Fixtures\Class2 $paramFQN
2930
* @param Class2 $paramLocalName
3031
* @param ClassClass3 $paramAlias
3132
*/
32-
public function foo($paramNone, $paramFQN, $paramLocalName, $paramAlias)
33+
public function foo($paramNone, Class2 $paramTypeHint, $paramFQN, $paramLocalName, $paramAlias)
3334
{
3435
}
3536
}

tests/UnitTest/PhpDocReader/FunctionalTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function testReadParamType()
3939
$type = $parser->getParameterType(new ReflectionParameter($method, 'paramNone'));
4040
$this->assertNull($type);
4141

42+
$type = $parser->getParameterType(new ReflectionParameter($method, 'paramTypeHint'));
43+
$this->assertEquals('UnitTest\PhpDocReader\Fixtures\Class2', $type);
44+
4245
$type = $parser->getParameterType(new ReflectionParameter($method, 'paramFQN'));
4346
$this->assertEquals('UnitTest\PhpDocReader\Fixtures\Class2', $type);
4447

0 commit comments

Comments
 (0)