multiple snapshots

This commit is contained in:
Fabio Ivona
2023-07-27 11:46:22 +02:00
parent b60d21dfe2
commit 1efb9de043
17 changed files with 74 additions and 2 deletions

View File

@ -806,6 +806,7 @@ final class Expectation
public function toMatchSnapshot(string $message = ''): self
{
$snapshots = TestSuite::getInstance()->snapshots;
$snapshots->startNewExpectation();
$testCase = TestSuite::getInstance()->test;
assert($testCase instanceof TestCase);
@ -833,7 +834,7 @@ final class Expectation
} else {
$filename = $snapshots->save($string);
$testCase::markTestIncomplete('Snapshot created at ['.$filename.'].');
//$testCase::markTestIncomplete('Snapshot created at ['.$filename.'].');
}
return $this;