mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
remove plugin to ensure argument reaches paratest
This commit is contained in:
@ -107,8 +107,7 @@
|
|||||||
"Pest\\Plugins\\Snapshot",
|
"Pest\\Plugins\\Snapshot",
|
||||||
"Pest\\Plugins\\Verbose",
|
"Pest\\Plugins\\Verbose",
|
||||||
"Pest\\Plugins\\Version",
|
"Pest\\Plugins\\Version",
|
||||||
"Pest\\Plugins\\Parallel",
|
"Pest\\Plugins\\Parallel"
|
||||||
"Pest\\Plugins\\JUnit"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"phpstan": {
|
"phpstan": {
|
||||||
|
|||||||
@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Pest\Plugins;
|
|
||||||
|
|
||||||
use Pest\Contracts\Plugins\HandlesArguments;
|
|
||||||
use Pest\Plugins\Concerns\HandleArguments;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
final class JUnit implements HandlesArguments
|
|
||||||
{
|
|
||||||
use HandleArguments;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the arguments, adding the cache directory and the cache result arguments.
|
|
||||||
*/
|
|
||||||
public function handleArguments(array $arguments): array
|
|
||||||
{
|
|
||||||
if (! $this->hasArgument('--log-junit', $arguments)) {
|
|
||||||
return $arguments;
|
|
||||||
}
|
|
||||||
|
|
||||||
$logUnitArgument = null;
|
|
||||||
|
|
||||||
$arguments = array_filter($arguments, function (string $argument) use (&$logUnitArgument): bool {
|
|
||||||
if (str_starts_with($argument, '--log-junit')) {
|
|
||||||
$logUnitArgument = $argument;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
assert(is_string($logUnitArgument));
|
|
||||||
|
|
||||||
$arguments[] = $logUnitArgument;
|
|
||||||
|
|
||||||
return array_values($arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user