File tree 1 file changed +3
-8
lines changed
tests/UnitTest/PhpDocReader
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 3
3
namespace UnitTest \PhpDocReader ;
4
4
5
5
use PhpDocReader \PhpDocReader ;
6
+ use ReflectionParameter ;
6
7
7
8
/**
8
9
* @see https://github.com/mnapoli/PhpDocReader/issues/1
@@ -26,15 +27,9 @@ public function testProperties($type)
26
27
public function testMethodParameters ($ type )
27
28
{
28
29
$ parser = new PhpDocReader ();
30
+ $ parameter = new ReflectionParameter (array ('UnitTest\PhpDocReader\FixturesIssue1\Class1 ' , 'foo ' ), $ type );
29
31
30
- $ class = new \ReflectionClass ('UnitTest\PhpDocReader\FixturesIssue1\Class1 ' );
31
- $ params = $ class ->getMethod ('foo ' )->getParameters ();
32
- $ keys = array_map (function (\ReflectionParameter $ param ) {
33
- return $ param ->getName ();
34
- }, $ params );
35
- $ params = array_combine ($ keys , $ params );
36
-
37
- $ this ->assertNull ($ parser ->getParameterClass ($ params [$ type ]));
32
+ $ this ->assertNull ($ parser ->getParameterClass ($ parameter ));
38
33
}
39
34
40
35
public function typeProvider ()
You can’t perform that action at this time.
0 commit comments