mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
fix incomplete tests while updating snapshots
This commit is contained in:
@ -100,7 +100,7 @@ final class TestSuite
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
if (! self::$instance instanceof self) {
|
||||
if (!self::$instance instanceof self) {
|
||||
Panic::with(new InvalidPestCommand());
|
||||
}
|
||||
|
||||
@ -114,6 +114,13 @@ final class TestSuite
|
||||
return (fn () => self::$__filename)->call($this->test, $this->test::class); // @phpstan-ignore-line
|
||||
}
|
||||
|
||||
public function registerSnapshotChange(string $message): void
|
||||
{
|
||||
assert($this->test instanceof TestCase);
|
||||
|
||||
(fn () => $this->__snapshotChanges[] = $message)->call($this->test, $this->test::class); // @phpstan-ignore-line
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
assert($this->test instanceof TestCase);
|
||||
|
||||
Reference in New Issue
Block a user