diff --git a/src/Testing/TestCase.neon b/src/Testing/TestCase.neon index 4040078660..627dd41a5e 100644 --- a/src/Testing/TestCase.neon +++ b/src/Testing/TestCase.neon @@ -11,11 +11,6 @@ services: fileExtensions: %fileExtensions% excludePaths: %excludePaths% - # overrides service from services.neon - cacheStorage: - class: PHPStan\Cache\MemoryCacheStorage - arguments!: [] - # overrides service from parsers.neon currentPhpVersionSimpleParser!: factory: @currentPhpVersionRichParser diff --git a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon new file mode 100644 index 0000000000..17c72730f7 --- /dev/null +++ b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon @@ -0,0 +1,5 @@ +services: + # overrides service from services.neon + cacheStorage: + class: PHPStan\Cache\MemoryCacheStorage + arguments!: [] diff --git a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php index 30b555e7b3..751520456b 100644 --- a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php +++ b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php @@ -12,6 +12,7 @@ use TestDirectorySourceLocator\AFoo; use TestDirectorySourceLocator\EmptyClass; use function array_map; +use function array_merge; use function basename; use const PHP_VERSION_ID; @@ -317,4 +318,14 @@ public function testBug5525(): void $this->assertSame('Faker\\Provider\\nl_BE\\Text', $className); } + public static function getAdditionalConfigFiles(): array + { + return array_merge( + parent::getAdditionalConfigFiles(), + [ + __DIR__ . '/OptimizedDirectorySourceLocatorTest.neon', + ], + ); + } + }