1 | <?php |
||
13 | class TestCommand extends Command |
||
14 | { |
||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'test {--without-tty : Disable output to TTY}'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Run the application tests'; |
||
28 | |||
29 | /** |
||
30 | * The arguments to be used while calling phpunit. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $arguments = [ |
||
35 | '--printer', |
||
36 | 'NunoMaduro\Collision\Adapters\Phpunit\Printer', |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * Create a new command instance. |
||
41 | * |
||
42 | * @return void |
||
|
|||
43 | */ |
||
44 | public function __construct() |
||
50 | |||
51 | /** |
||
52 | * Execute the console command. |
||
53 | * |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function handle() |
||
87 | |||
88 | /** |
||
89 | * Get the PHP binary to execute. |
||
90 | * |
||
91 | * @return array |
||
92 | */ |
||
93 | protected function binary() |
||
101 | |||
102 | /** |
||
103 | * Get the array of arguments for running PHPUnit. |
||
104 | * |
||
105 | * @param array $options |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | protected function phpunitArguments($options) |
||
121 | |||
122 | /** |
||
123 | * Clears any set Environment variables set by Laravel if the --env option is empty. |
||
124 | * |
||
125 | */ |
||
126 | protected function clearEnv() |
||
143 | } |
||
144 |
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.