mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
26 lines
915 B
PHP
26 lines
915 B
PHP
<?php
|
|
|
|
use Symfony\Component\Process\Process;
|
|
|
|
$run = function () {
|
|
$process = new Process(
|
|
array_merge(['php', 'bin/pest', '--parallel', '--processes=3'], func_get_args()),
|
|
dirname(__DIR__, 2),
|
|
['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true'],
|
|
);
|
|
|
|
$process->run();
|
|
|
|
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
|
|
};
|
|
|
|
test('parallel', function () use ($run) {
|
|
expect($run('--exclude-group=integration'))
|
|
->toContain('Tests: 1 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 15 skipped, 851 passed (1962 assertions)')
|
|
->toContain('Parallel: 3 processes');
|
|
})->skipOnWindows();
|
|
|
|
test('a parallel test can extend another test with same name', function () use ($run) {
|
|
expect($run('tests/Fixtures/Inheritance'))->toContain('Tests: 1 skipped, 2 passed (2 assertions)');
|
|
});
|