|
11 | 11 | ->shouldAllowMockingProtectedMethods(); |
12 | 12 | $executor->shouldReceive('buildCommand') |
13 | 13 | ->once() |
14 | | - ->andReturnUsing(fn ($toolClass, $arguments): array => buildSubprocessCommand($toolClass, $arguments)); |
| 14 | + ->andReturnUsing(buildSubprocessCommand(...)); |
15 | 15 |
|
16 | 16 | $response = $executor->execute(GetConfig::class, ['key' => 'app.name']); |
17 | 17 |
|
|
42 | 42 | $executor = Mockery::mock(ToolExecutor::class)->makePartial() |
43 | 43 | ->shouldAllowMockingProtectedMethods(); |
44 | 44 | $executor->shouldReceive('buildCommand') |
45 | | - ->andReturnUsing(fn ($toolClass, $arguments): array => buildSubprocessCommand($toolClass, $arguments)); |
| 45 | + ->andReturnUsing(buildSubprocessCommand(...)); |
46 | 46 |
|
47 | 47 | $response1 = $executor->execute(Tinker::class, ['code' => 'return getmypid();']); |
48 | 48 | $response2 = $executor->execute(Tinker::class, ['code' => 'return getmypid();']); |
|
62 | 62 | $executor = Mockery::mock(ToolExecutor::class)->makePartial() |
63 | 63 | ->shouldAllowMockingProtectedMethods(); |
64 | 64 | $executor->shouldReceive('buildCommand') |
65 | | - ->andReturnUsing(fn ($toolClass, $arguments): array => buildSubprocessCommand($toolClass, $arguments)); |
| 65 | + ->andReturnUsing(buildSubprocessCommand(...)); |
66 | 66 |
|
67 | 67 | // Path to the GetConfig tool that we'll temporarily modify |
68 | 68 | // TODO: Improve for parallelisation |
@@ -136,7 +136,7 @@ function buildSubprocessCommand(string $toolClass, array $arguments): array |
136 | 136 | ->shouldAllowMockingProtectedMethods(); |
137 | 137 |
|
138 | 138 | $executor->shouldReceive('buildCommand') |
139 | | - ->andReturnUsing(fn ($toolClass, $arguments): array => buildSubprocessCommand($toolClass, $arguments)); |
| 139 | + ->andReturnUsing(buildSubprocessCommand(...)); |
140 | 140 |
|
141 | 141 | // Test with custom timeout - should succeed with fast code |
142 | 142 | $response = $executor->execute(Tinker::class, [ |
|
0 commit comments