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