|
|
@@ -25,7 +25,7 @@ class TestMakeCommand extends \Illuminate\Foundation\Console\TestMakeCommand
|
|
|
if ($this->option('services')
|
|
|
||$this->option('service')) {
|
|
|
return $rootNamespace.'\Services\\'
|
|
|
- .ucfirst($this->getServiceName())
|
|
|
+ .$this->getServiceName()
|
|
|
;
|
|
|
}
|
|
|
if ($this->option('unit')) {
|
|
|
@@ -49,6 +49,11 @@ class TestMakeCommand extends \Illuminate\Foundation\Console\TestMakeCommand
|
|
|
$input= trim($this->argument('name'));
|
|
|
return ucfirst(explode(':',$input)[0]);
|
|
|
}
|
|
|
+ protected function getModelName()
|
|
|
+ {
|
|
|
+ $input= trim($this->argument('name'));
|
|
|
+ return str_replace('Service','',(explode(':',$input)[0]));
|
|
|
+ }
|
|
|
protected function getMethodName()
|
|
|
{
|
|
|
$input= trim($this->argument('name'));
|
|
|
@@ -75,6 +80,8 @@ class TestMakeCommand extends \Illuminate\Foundation\Console\TestMakeCommand
|
|
|
$class = str_replace($this->getNamespace($name).'\\', '', $this->getMethodName());
|
|
|
$class = str_replace('\\', '', $class);
|
|
|
$stub = str_replace(['{{ serviceName }}', '{{serviceName}}'], $this->getServiceName(), $stub);
|
|
|
+ $stub = str_replace(['{{ modelName }}', '{{modelName}}'], $this->getModelName(), $stub);
|
|
|
+ $stub = str_replace(['{{ modelNameUc }}', '{{modelNameUc}}'], ucfirst($this->getModelName()), $stub);
|
|
|
|
|
|
return str_replace(['DummyClass', '{{ class }}', '{{class}}'], $class, $stub);
|
|
|
}
|