diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index 022c0d1a..49c6eaad 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -165,7 +165,7 @@ final class TestCaseFactory }, $filename); } - $filename = realpath($filename); + $filename = (string) realpath($filename); $rootPath = TestSuite::getInstance()->rootPath; $relativePath = str_replace($rootPath . DIRECTORY_SEPARATOR, '', $filename); $relativePath = dirname(ucfirst($relativePath)) . DIRECTORY_SEPARATOR . basename($relativePath, '.php'); diff --git a/src/PendingObjects/UsesCall.php b/src/PendingObjects/UsesCall.php index 52d81b74..f9418fd5 100644 --- a/src/PendingObjects/UsesCall.php +++ b/src/PendingObjects/UsesCall.php @@ -83,7 +83,7 @@ final class UsesCall throw new InvalidUsesPath($target); } - return realpath($target); + return (string) realpath($target); }, $targets); } diff --git a/src/Support/Backtrace.php b/src/Support/Backtrace.php index 0e87e849..cf90ab03 100644 --- a/src/Support/Backtrace.php +++ b/src/Support/Backtrace.php @@ -24,7 +24,7 @@ final class Backtrace $current = null; foreach (debug_backtrace() as $trace) { - if (Str::endsWith($trace[self::FILE], realpath('vendor/phpunit/phpunit/src/Util/FileLoader.php'))) { + if (Str::endsWith($trace[self::FILE], (string) realpath('vendor/phpunit/phpunit/src/Util/FileLoader.php'))) { break; }