• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orchestral / testbench-core / 13800544011

11 Mar 2025 11:56PM UTC coverage: 93.019% (-0.03%) from 93.052%
13800544011

push

github

crynobone
wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

8 of 9 new or added lines in 2 files covered. (88.89%)

1439 of 1547 relevant lines covered (93.02%)

67.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/src/Foundation/Process/ProcessDecorator.php
1
<?php
2

3
namespace Orchestra\Testbench\Foundation\Process;
4

5
use Illuminate\Support\Traits\ForwardsCalls;
6
use Symfony\Component\Process\Process;
7

8
/**
9
 * @mixin \Symfony\Component\Process\Process
10
 */
11
class ProcessDecorator
12
{
13
    use ForwardsCalls;
14

15
    /**
16
     * Create a new process decorator instance.
17
     *
18
     * @param  \Symfony\Component\Process\Process  $process
19
     * @param  array<int, string>|string  $command
20
     */
21
    public function __construct(
22
        protected Process $process,
23
        protected array|string $command,
24
    ) {}
11✔
25

26
    /**
27
     * Handle dynamic calls to the process instance.
28
     *
29
     * @param  string  $method
30
     * @param  array<int, mixed>  $parameters
31
     * @return $this|\Orchestra\Testbench\Foundation\Process\ProcessResult
32
     */
33
    public function __call($method, $parameters)
34
    {
35
        $response = $this->forwardDecoratedCallTo($this->process, $method, $parameters);
11✔
36

37
        if (
38
            $response instanceof Process
11✔
39
            && ! $response->isStarted()
11✔
40
            && ! $response->isRunning()
11✔
41
            && $response->isTerminated()
11✔
42
        ) {
NEW
43
            return new ProcessResult($response);
×
44
        }
45

46
        return $response;
11✔
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc