mirror of
https://github.com/pestphp/pest.git
synced 2026-12-06 15:52:16 +01:00
chore: ci fixes
This commit is contained in:
@@ -369,7 +369,7 @@ final class WrapperRunner implements RunnerInterface
|
|||||||
$failedEvents = array_merge_recursive($testResultSum->testFailedEvents(), $testResult->testFailedEvents());
|
$failedEvents = array_merge_recursive($testResultSum->testFailedEvents(), $testResult->testFailedEvents());
|
||||||
|
|
||||||
$testResultSum = new TestResult(
|
$testResultSum = new TestResult(
|
||||||
(int) $testResultSum->hasTests() + (int) $testResult->hasTests(),
|
ResultReflection::numberOfTests($testResultSum) + self::numberOfTestsSeenByWorker($testResult),
|
||||||
$testResultSum->numberOfTestsRun() + $testResult->numberOfTestsRun(),
|
$testResultSum->numberOfTestsRun() + $testResult->numberOfTestsRun(),
|
||||||
$testResultSum->numberOfAssertions() + $testResult->numberOfAssertions(),
|
$testResultSum->numberOfAssertions() + $testResult->numberOfAssertions(),
|
||||||
array_merge_recursive($testResultSum->testErroredEvents(), $testResult->testErroredEvents()),
|
array_merge_recursive($testResultSum->testErroredEvents(), $testResult->testErroredEvents()),
|
||||||
@@ -500,6 +500,11 @@ final class WrapperRunner implements RunnerInterface
|
|||||||
return $exitcode;
|
return $exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function numberOfTestsSeenByWorker(TestResult $result): int
|
||||||
|
{
|
||||||
|
return max(ResultReflection::numberOfTests($result), $result->numberOfTestsRun());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array{self: non-negative-int, direct: non-negative-int, indirect: non-negative-int, unknown: non-negative-int}
|
* @return array{self: non-negative-int, direct: non-negative-int, indirect: non-negative-int, unknown: non-negative-int}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
|
|||||||
{
|
{
|
||||||
$filtered = $this->removeParallelArguments($arguments);
|
$filtered = $this->removeParallelArguments($arguments);
|
||||||
|
|
||||||
return ['php', ...$filtered, '--test-directory='.$testPath, '--list-tests'];
|
return [PHP_BINARY, ...$filtered, '--test-directory='.$testPath, '--list-tests'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ describe('buildListTestsCommand', function (): void {
|
|||||||
$command = $method->invoke($shard, ['bin/pest', '--update-shards'], 'custom/suite');
|
$command = $method->invoke($shard, ['bin/pest', '--update-shards'], 'custom/suite');
|
||||||
|
|
||||||
expect($command)->toBe([
|
expect($command)->toBe([
|
||||||
'php',
|
PHP_BINARY,
|
||||||
'bin/pest',
|
'bin/pest',
|
||||||
'--update-shards',
|
'--update-shards',
|
||||||
'--test-directory=custom/suite',
|
'--test-directory=custom/suite',
|
||||||
@@ -385,7 +385,7 @@ describe('buildListTestsCommand', function (): void {
|
|||||||
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--update-shards', '-p'], 'tests');
|
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--update-shards', '-p'], 'tests');
|
||||||
|
|
||||||
expect($command)->toBe([
|
expect($command)->toBe([
|
||||||
'php',
|
PHP_BINARY,
|
||||||
'bin/pest',
|
'bin/pest',
|
||||||
'--update-shards',
|
'--update-shards',
|
||||||
'--test-directory=tests',
|
'--test-directory=tests',
|
||||||
@@ -415,7 +415,7 @@ describe('buildListTestsCommand', function (): void {
|
|||||||
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--processes=4', '--update-shards'], 'tests');
|
$command = $method->invoke($shard, ['bin/pest', '--parallel', '--processes=4', '--update-shards'], 'tests');
|
||||||
|
|
||||||
expect($command)->toBe([
|
expect($command)->toBe([
|
||||||
'php',
|
PHP_BINARY,
|
||||||
'bin/pest',
|
'bin/pest',
|
||||||
'--update-shards',
|
'--update-shards',
|
||||||
'--test-directory=tests',
|
'--test-directory=tests',
|
||||||
|
|||||||
Reference in New Issue
Block a user