| Total Complexity | 4 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class TestsGeneratorCommand extends BaseCommand |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The console command name. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $name = 'artomator.api:tests'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The console command description. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $description = 'Create tests command'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Create a new command instance. |
||
| 28 | */ |
||
| 29 | public function __construct() |
||
| 30 | { |
||
| 31 | parent::__construct(); |
||
| 32 | |||
| 33 | $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Execute the command. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function handle() |
||
| 42 | { |
||
| 43 | parent::handle(); |
||
| 44 | |||
| 45 | $repositoryTestGenerator = new RepositoryTestGenerator($this->commandData); |
||
| 46 | $repositoryTestGenerator->generate(); |
||
| 47 | |||
| 48 | $apiTestGenerator = new APITestGenerator($this->commandData); |
||
| 49 | $apiTestGenerator->generate(); |
||
| 50 | |||
| 51 | $this->performPostActions(); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get the console command options. |
||
| 56 | * |
||
| 57 | * @return array |
||
| 58 | */ |
||
| 59 | public function getOptions() |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Get the console command arguments. |
||
| 66 | * |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | protected function getArguments() |
||
| 72 | } |
||
| 73 | } |
||
| 74 |