/** * @param Generator $modelGenerator * @param $fileName * @throws GeneratorException */ private function saveClassToFile($modelGenerator, $fileName) { $outputOnly = $this->input->getOption('output-only'); if ($fileName && !$outputOnly) { $this->output->writeln("Saving class to file: '{$fileName}'"); $modelGenerator->saveToFile($fileName); } }
/** * @test */ public function shouldGetCorrectNamespace() { //given $generator = new Generator('products'); //when $namespace = $generator->getClassNamespace(); //then $this->assertEquals('Application\\Model', $namespace); }