1 | <?php |
||
19 | class TestRunner |
||
20 | { |
||
21 | /** |
||
22 | * Test runner working path. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $workingPath; |
||
27 | |||
28 | /** |
||
29 | * Disable output to TTY. |
||
30 | * |
||
31 | * @var bool |
||
32 | */ |
||
33 | protected $withoutTty; |
||
34 | |||
35 | /** |
||
36 | * The arguments to be used while calling phpunit. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $arguments = [ |
||
41 | '--printer', |
||
42 | 'NunoMaduro\Collision\Adapters\Phpunit\Printer', |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * Creates a new instance of the TestRunner. |
||
47 | * |
||
48 | * @param string $workingPath |
||
49 | * @param bool $withoutTty |
||
50 | */ |
||
51 | public function __construct(string $workingPath, bool $withoutTty = false) |
||
56 | |||
57 | /** |
||
58 | * Handle the test runner. |
||
59 | * |
||
60 | * @param \Symfony\Component\Console\Style\OutputStyle $output |
||
61 | * @param array $options |
||
62 | * |
||
63 | * @return int |
||
64 | */ |
||
65 | public function __invoke(OutputStyle $output, array $options): int |
||
92 | |||
93 | /** |
||
94 | * Get the PHP binary to execute. |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | protected function binary(): array |
||
106 | |||
107 | /** |
||
108 | * Get the array of arguments for running PHPUnit. |
||
109 | * |
||
110 | * @param array $options |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function phpunitArguments(array $options): array |
||
126 | } |
||
127 |