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

orchestral / testbench-core / 13800510149

11 Mar 2025 11:52PM UTC coverage: 92.492% (-0.02%) from 92.512%
13800510149

push

github

crynobone
wip

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

11 of 12 new or added lines in 2 files covered. (91.67%)

5 existing lines in 1 file now uncovered.

1503 of 1625 relevant lines covered (92.49%)

74.31 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 Closure;
6
use Illuminate\Support\Traits\ForwardsCalls;
7
use Symfony\Component\Process\Process;
8

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

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

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

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

47
        return $response;
12✔
48
    }
49
}
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