Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ protected function setUp(): void
{
parent::setUp();

// reset the container to boot an isolated cache dir, so parallel test processes cannot
// wipe the shared default cache mid-run and flip the caching assertions below
self::$rectorConfig = null;
$this->bootFromConfigFiles([__DIR__ . '/config.php']);

$this->applicationFileProcessor = $this->make(ApplicationFileProcessor::class);
$this->changedFilesDetector = $this->make(ChangedFilesDetector::class);
}
Expand Down
11 changes: 11 additions & 0 deletions tests/Application/ApplicationFileProcessor/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
// isolated cache dir, so parallel test processes cannot wipe the shared default cache
// mid-run and flip the caching assertions of this test
$rectorConfig->cacheDirectory(sys_get_temp_dir() . '/_rector_application_file_processor_test');
};
Loading