chore(cleanup): Tidy-up and tweaks of Pest Parallel integration.

This commit is contained in:
Luke Downing
2023-02-13 09:43:49 +00:00
parent b6fb81e506
commit 5ca4c5bca9
4 changed files with 27 additions and 26 deletions

View File

@ -21,6 +21,9 @@ final class Laravel implements HandlesArguments
{
use HandleArguments;
/**
* {@inheritdoc}
*/
public function handleArguments(array $arguments): array
{
return self::whenUsingLaravel($arguments, function (array $arguments): array {
@ -43,10 +46,8 @@ final class Laravel implements HandlesArguments
{
$isLaravelApplication = InstalledVersions::isInstalled('laravel/framework', false);
$isLaravelPackage = class_exists(\Orchestra\Testbench\TestCase::class);
if ($isLaravelApplication) {
return $closure($arguments);
}
if ($isLaravelPackage) {
if ($isLaravelApplication && ! $isLaravelPackage) {
return $closure($arguments);
}

View File

@ -25,7 +25,7 @@ final class Parallel implements HandlesArguments
];
/**
* Handles the arguments, removing the ones that are not needed, and adding the "runner" argument.
* Handles the arguments, removing the ones that are not needed, and adds the "runner" argument.
*/
public function handleArguments(array $arguments): array
{