/** * Execute the command. * * @return void */ public function handle() { parent::handle(); $repositoryTestGenerator = new RepositoryTestGenerator($this->commandData); $repositoryTestGenerator->generate(); $testTraitGenerator = new TestTraitGenerator($this->commandData); $testTraitGenerator->generate(); $apiTestGenerator = new APITestGenerator($this->commandData); $apiTestGenerator->generate(); $this->performPostActions(); }
public function generateAPIItems() { if (!$this->isSkip('requests') and !$this->isSkip('api_requests')) { $requestGenerator = new APIRequestGenerator($this->commandData); $requestGenerator->generate(); } if (!$this->isSkip('controllers') and !$this->isSkip('api_controller')) { $controllerGenerator = new APIControllerGenerator($this->commandData); $controllerGenerator->generate(); } if (!$this->isSkip('routes') and !$this->isSkip('api_routes')) { $routesGenerator = new APIRoutesGenerator($this->commandData); $routesGenerator->generate(); } if (!$this->isSkip('tests') and $this->commandData->getAddOn('tests')) { $repositoryTestGenerator = new RepositoryTestGenerator($this->commandData); $repositoryTestGenerator->generate(); $testTraitGenerator = new TestTraitGenerator($this->commandData); $testTraitGenerator->generate(); $apiTestGenerator = new APITestGenerator($this->commandData); $apiTestGenerator->generate(); } }