diff --git a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocatorTest.php b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocatorTest.php new file mode 100644 index 0000000000..6d966bcc41 --- /dev/null +++ b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocatorTest.php @@ -0,0 +1,29 @@ +getParser()), function () use (&$functionReflector): FunctionReflector { + return $functionReflector; + }); + $locator = new AutoloadSourceLocator($astLocator); + $classReflector = new ClassReflector($locator); + $functionReflector = new FunctionReflector($locator, $classReflector); + $aFoo = $classReflector->reflect(AFoo::class); + $this->assertSame('a.php', basename($aFoo->getFileName())); + } + +}