1 | <?php |
||
11 | class TestCommand extends Command |
||
12 | { |
||
13 | /** |
||
14 | * The name and signature of the console command. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'test {--without-tty : Disable output to TTY}'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'Run the application tests'; |
||
26 | |||
27 | /** |
||
28 | * The arguments to be used while calling phpunit. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $arguments = [ |
||
33 | '--printer', |
||
34 | 'NunoMaduro\Collision\Adapters\Phpunit\Printer', |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * Create a new command instance. |
||
39 | * |
||
40 | * @return void |
||
|
|||
41 | */ |
||
42 | public function __construct() |
||
48 | |||
49 | /** |
||
50 | * Execute the console command. |
||
51 | * |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function handle() |
||
81 | |||
82 | /** |
||
83 | * Get the PHP binary to execute. |
||
84 | * |
||
85 | * @return array |
||
86 | */ |
||
87 | protected function binary() |
||
95 | |||
96 | /** |
||
97 | * Get the array of arguments for running PHPUnit. |
||
98 | * |
||
99 | * @param array $options |
||
100 | * |
||
101 | * @return array |
||
102 | */ |
||
103 | protected function phpunitArguments($options) |
||
115 | } |
||
116 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.