mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 22:33:35 +02:00
fix: fail missing snapshots in CI (#1842)
Prevent snapshot assertions from silently creating missing snapshots during CI runs unless --update-snapshots is enabled.
This commit is contained in:
@@ -56,7 +56,12 @@ final class SnapshotRepository
|
||||
|
||||
file_put_contents($snapshotFilename, $snapshot);
|
||||
|
||||
return str_replace(dirname($this->testsPath).'/', '', $snapshotFilename);
|
||||
return $this->filename();
|
||||
}
|
||||
|
||||
public function filename(): string
|
||||
{
|
||||
return str_replace(dirname($this->testsPath).'/', '', $this->getSnapshotFilename());
|
||||
}
|
||||
|
||||
public function flush(): void
|
||||
|
||||
Reference in New Issue
Block a user