mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
fix line endings on Windows
This commit is contained in:
@ -827,14 +827,13 @@ final class Expectation
|
|||||||
[$filename, $content] = $snapshots->get();
|
[$filename, $content] = $snapshots->get();
|
||||||
|
|
||||||
Assert::assertSame(
|
Assert::assertSame(
|
||||||
$content,
|
strtr($content, ["\r\n" => "\n", "\r" => "\n"]),
|
||||||
$string,
|
strtr($string, ["\r\n" => "\n", "\r" => "\n"]),
|
||||||
$message === '' ? "Failed asserting that the string value matches its snapshot ($filename)." : $message
|
$message === '' ? "Failed asserting that the string value matches its snapshot ($filename)." : $message
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$filename = $snapshots->save($string);
|
$filename = $snapshots->save($string);
|
||||||
|
|
||||||
// $testCase::markTestIncomplete('Snapshot created at ['.$filename.'].');
|
|
||||||
TestSuite::getInstance()->registerSnapshotChange("Snapshot created at [$filename]");
|
TestSuite::getInstance()->registerSnapshotChange("Snapshot created at [$filename]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user