From a8e974d64a122f4b54f1332ddcf79191065f7d85 Mon Sep 17 00:00:00 2001 From: nuno maduro Date: Fri, 10 Apr 2026 12:35:32 +0100 Subject: [PATCH] chore: updates snapshots --- .github/workflows/static.yml | 3 --- composer.json | 13 ++++++++----- src/Expectation.php | 4 ++++ tests/.snapshots/success.txt | 3 +-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 6f5ee1bd..68892bf2 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -61,8 +61,5 @@ jobs: - name: Type Coverage run: composer test:type:coverage - - name: Refacto - run: composer test:refacto - - name: Style run: composer test:lint diff --git a/composer.json b/composer.json index 159f053e..ee083a10 100644 --- a/composer.json +++ b/composer.json @@ -73,10 +73,14 @@ "bin/pest" ], "scripts": { - "refacto": "rector", - "lint": "pint --parallel", - "test:refacto": "rector --dry-run", - "test:lint": "pint --parallel --test", + "lint": [ + "rector", + "pint --parallel" + ], + "test:lint": [ + "rector --dry-run", + "pint --parallel --test" + ], "test:profanity": "php bin/pest --profanity --compact", "test:type:check": "phpstan analyse --ansi --memory-limit=-1 --debug", "test:type:coverage": "php -d memory_limit=-1 bin/pest --type-coverage --min=100", @@ -86,7 +90,6 @@ "test:integration": "php bin/pest --group=integration -v", "update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --update-snapshots", "test": [ - "@test:refacto", "@test:lint", "@test:type:check", "@test:type:coverage", diff --git a/src/Expectation.php b/src/Expectation.php index 908f5954..60c047bb 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -684,6 +684,10 @@ final class Expectation $realPath = realpath($object->path); + if ($realPath === false) { + return false; + } + foreach (Composer::userNamespacesWithDirectories() as $directory => $namespace) { if (str_starts_with($realPath, $directory)) { $relativePath = substr($realPath, strlen($directory) + 1); diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 3fc2ef4b..d6ae24e0 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -1813,5 +1813,4 @@ ✓ pass with dataset with ('my-datas-set-value') ✓ within describe → pass with dataset with ('my-datas-set-value') - Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 35 skipped, 1209 passed (2842 assertions) - + Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 35 skipped, 1211 passed (2847 assertions) \ No newline at end of file