mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: removes both toHaveMethod and toHaveMethods
This commit is contained in:
@ -16,7 +16,7 @@ $run = function () {
|
||||
|
||||
test('parallel', function () use ($run) {
|
||||
expect($run('--exclude-group=integration'))
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 17 todos, 19 skipped, 1075 passed (2618 assertions)')
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 17 todos, 19 skipped, 1069 passed (2585 assertions)')
|
||||
->toContain('Parallel: 3 processes');
|
||||
})->skipOnWindows();
|
||||
|
||||
|
||||
@ -11,31 +11,23 @@ $run = function (string $target, bool $parallel) {
|
||||
|
||||
expect($process->getExitCode())->toBe(0);
|
||||
|
||||
return removeAnsiEscapeSequences($process->getOutput());
|
||||
$output = $process->getOutput();
|
||||
|
||||
return preg_replace('/Duration: \d+\.\d+s/', 'Duration: x.xxs', removeAnsiEscapeSequences($output));
|
||||
};
|
||||
|
||||
$snapshot = function ($name) {
|
||||
$testsPath = dirname(__DIR__);
|
||||
|
||||
return file_get_contents(implode(DIRECTORY_SEPARATOR, [
|
||||
$testsPath,
|
||||
'.snapshots',
|
||||
"$name.txt",
|
||||
]));
|
||||
};
|
||||
|
||||
test('todos', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', false))->toContain($snapshot('todos'));
|
||||
test('todos', function () use ($run) {
|
||||
expect($run('--todos', false))->toMatchSnapshot();
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todos in parallel', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', true))->toContain($snapshot('todos'));
|
||||
test('todos in parallel', function () use ($run) {
|
||||
expect($run('--todos', true))->toMatchSnapshot();
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todo', function () use ($run, $snapshot) {
|
||||
expect($run('--todo', false))->toContain($snapshot('todo'));
|
||||
test('todo', function () use ($run) {
|
||||
expect($run('--todo', false))->toMatchSnapshot();
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todo in parallel', function () use ($run, $snapshot) {
|
||||
expect($run('--todo', true))->toContain($snapshot('todo'));
|
||||
test('todo in parallel', function () use ($run) {
|
||||
expect($run('--todo', true))->toMatchSnapshot();
|
||||
})->skipOnWindows();
|
||||
|
||||
Reference in New Issue
Block a user