mirror of
https://github.com/pestphp/pest.git
synced 2026-04-20 22:20:17 +02:00
release: v4.6.1
This commit is contained in:
@ -6,7 +6,7 @@ namespace Pest;
|
||||
|
||||
function version(): string
|
||||
{
|
||||
return '4.6.0';
|
||||
return '4.6.1';
|
||||
}
|
||||
|
||||
function testDirectory(string $file = ''): string
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Snapshot</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,7 +0,0 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Snapshot</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
Pest Testing Framework 4.6.0.
|
||||
Pest Testing Framework 4.6.1.
|
||||
|
||||
USAGE: pest <file> [options]
|
||||
|
||||
@ -91,7 +91,11 @@
|
||||
--cache-result ............................ Write test results to cache file
|
||||
--do-not-cache-result .............. Do not write test results to cache file
|
||||
--order-by [order] Run tests in order: default|defects|depends|duration|no-depends|random|reverse|size
|
||||
--resolve-dependencies ...................... Alias for "--order-by depends"
|
||||
--ignore-dependencies .................... Alias for "--order-by no-depends"
|
||||
--random-order ............................... Alias for "--order-by random"
|
||||
--random-order-seed [N] Use the specified random seed when running tests in random order
|
||||
--reverse-order ............................. Alias for "--order-by reverse"
|
||||
|
||||
REPORTING OPTIONS:
|
||||
--colors=[flag] ......... Use colors in output ("never", "auto" or "always")
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
|
||||
Pest Testing Framework 4.6.0.
|
||||
Pest Testing Framework 4.6.1.
|
||||
|
||||
|
||||
@ -1037,8 +1037,6 @@
|
||||
✓ pass with toArray
|
||||
✓ pass with array
|
||||
✓ pass with toSnapshot
|
||||
✓ failures
|
||||
✓ failures with custom message
|
||||
✓ not failures
|
||||
✓ multiple snapshot expectations
|
||||
✓ multiple snapshot expectations with datasets with (1)
|
||||
@ -1903,4 +1901,4 @@
|
||||
✓ pass with dataset with ('my-datas-set-value')
|
||||
✓ within describe → pass with dataset with ('my-datas-set-value')
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 35 skipped, 1296 passed (2977 assertions)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 35 skipped, 1294 passed (2971 assertions)
|
||||
@ -134,18 +134,6 @@ test('pass with `toSnapshot`', function () {
|
||||
expect($object)->toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
TestSuite::getInstance()->snapshots->save($this->snapshotable);
|
||||
|
||||
expect('contain that does not match snapshot')->toMatchSnapshot();
|
||||
})->throws(ExpectationFailedException::class, 'Failed asserting that two strings are identical.');
|
||||
|
||||
test('failures with custom message', function () {
|
||||
TestSuite::getInstance()->snapshots->save($this->snapshotable);
|
||||
|
||||
expect('contain that does not match snapshot')->toMatchSnapshot('oh no');
|
||||
})->throws(ExpectationFailedException::class, 'oh no');
|
||||
|
||||
test('not failures', function () {
|
||||
TestSuite::getInstance()->snapshots->save($this->snapshotable);
|
||||
|
||||
|
||||
@ -86,5 +86,12 @@ dataset('dataset_in_pest_file', ['A', 'B']);
|
||||
|
||||
function removeAnsiEscapeSequences(string $input): ?string
|
||||
{
|
||||
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $input);
|
||||
return preg_replace(
|
||||
[
|
||||
'#\\x1b[[][^A-Za-z]*[A-Za-z]#', // CSI (colors, cursor, etc.)
|
||||
'#\\x1b\\]8;[^\\x1b\\x07]*(?:\\x1b\\\\|\\x07)#', // OSC 8 hyperlinks
|
||||
],
|
||||
'',
|
||||
$input,
|
||||
);
|
||||
}
|
||||
|
||||
@ -23,13 +23,13 @@ test('parallel', function () use ($run) {
|
||||
$file = file_get_contents(__FILE__);
|
||||
$file = preg_replace(
|
||||
'/\$expected = \'.*?\';/',
|
||||
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1280 passed (2926 assertions)';",
|
||||
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1278 passed (2920 assertions)';",
|
||||
$file,
|
||||
);
|
||||
file_put_contents(__FILE__, $file);
|
||||
}
|
||||
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1280 passed (2926 assertions)';
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1278 passed (2920 assertions)';
|
||||
|
||||
expect($output)
|
||||
->toContain("Tests: {$expected}")
|
||||
|
||||
@ -21,8 +21,10 @@ test('visual snapshot of test suite on success', function () {
|
||||
|
||||
return preg_replace([
|
||||
'#\\x1b[[][^A-Za-z]*[A-Za-z]#',
|
||||
'#\\x1b\\]8;[^\\x1b\\x07]*(?:\\x1b\\\\|\\x07)#',
|
||||
'/(Tests\\\PHPUnit\\\CustomAffixes\\\InvalidTestName)([A-Za-z0-9]*)/',
|
||||
], [
|
||||
'',
|
||||
'',
|
||||
'$1',
|
||||
], $process->getOutput());
|
||||
|
||||
Reference in New Issue
Block a user