Skip to content

Commit

Permalink
Fix AbstractFixerTestCase::getTestFile
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Dec 1, 2023
1 parent 52a0a1c commit 7cce4f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/Test/AbstractFixerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,14 @@ final protected static function getTestFile(string $filename = __FILE__): \SplFi
{
static $files = [];

return $files[$filename] ?? $files[$filename] = new \SplFileInfo($filename);
return $files[$filename] ?? $files[$filename] = new class($filename) extends \SplFileInfo {
public function getRealPath(): string
{
return false !== parent::getRealPath()
? parent::getRealPath()
: $this->getPathname();
}
};
}

/**
Expand Down

0 comments on commit 7cce4f9

Please sign in to comment.