File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 99use a9f \Fractor \Caching \Contract \ValueObject \Storage \CacheStorageInterface ;
1010use a9f \Fractor \Caching \ValueObject \Storage \MemoryCacheStorage ;
1111use a9f \Fractor \Configuration \Parameter \SimpleParameterProvider ;
12+ use a9f \Fractor \Testing \PHPUnit \StaticPHPUnitEnvironment ;
1213use Helmich \TypoScriptParser \Parser \Printer \PrettyPrinterConditionTermination ;
1314use OndraM \CiDetector \CiDetector ;
1415use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
@@ -81,7 +82,7 @@ public function __invoke(ContainerConfigurator $containerConfigurator): void
8182 $ parameters ->set (Option::CACHE_CLASS , $ this ->cacheClass );
8283 SimpleParameterProvider::setParameter (Option::CACHE_CLASS , $ this ->cacheClass );
8384 }
84- if ((new CiDetector ())->isCiDetected ()) {
85+ if (StaticPHPUnitEnvironment:: isPHPUnitRun () || (new CiDetector ())->isCiDetected ()) {
8586 $ parameters ->set (Option::CACHE_CLASS , MemoryCacheStorage::class);
8687 SimpleParameterProvider::setParameter (Option::CACHE_CLASS , MemoryCacheStorage::class);
8788 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace a9f \Fractor \Testing \PHPUnit ;
6+
7+ final class StaticPHPUnitEnvironment
8+ {
9+ public static function isPHPUnitRun (): bool
10+ {
11+ return \defined ('PHPUNIT_COMPOSER_INSTALL ' );
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments