From 1f6970a5b3944c9f15abae9163fae8662c8d2cac Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sat, 17 Jun 2023 14:01:48 +0100 Subject: [PATCH] fix: returns relative path from snapshot --- src/Repositories/SnapshotRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Repositories/SnapshotRepository.php b/src/Repositories/SnapshotRepository.php index 7725cc13..89a4135e 100644 --- a/src/Repositories/SnapshotRepository.php +++ b/src/Repositories/SnapshotRepository.php @@ -49,7 +49,9 @@ final class SnapshotRepository throw ShouldNotHappen::fromMessage('Snapshot file could not be read.'); } - return [$snapshotFilename, $contents]; + $snapshot = str_replace(dirname($this->testsPath).'/', '', $snapshotFilename); + + return [$snapshot, $contents]; } /**