|
|
|
@ -131,7 +131,8 @@ class CrudMake extends Command |
|
|
|
|
|
|
|
public function getFeatureTestContent() |
|
|
|
{ |
|
|
|
return $this->files->get(__DIR__.'/stubs/test.stub'); |
|
|
|
$stub = $this->files->get(__DIR__.'/stubs/test.stub'); |
|
|
|
return $this->replaceFeatureTestDummyStrings($stub)->replaceClass($stub); |
|
|
|
} |
|
|
|
|
|
|
|
public function getUnitTestContent() |
|
|
|
@ -159,6 +160,17 @@ class CrudMake extends Command |
|
|
|
return $this; |
|
|
|
} |
|
|
|
|
|
|
|
protected function replaceFeatureTestDummyStrings(&$stub) |
|
|
|
{ |
|
|
|
$stub = str_replace( |
|
|
|
['DummyClass'], |
|
|
|
['Manage'.$this->pluralModelName.'Test'], |
|
|
|
$stub |
|
|
|
); |
|
|
|
|
|
|
|
return $this; |
|
|
|
} |
|
|
|
|
|
|
|
protected function replaceClass($stub) |
|
|
|
{ |
|
|
|
$class = str_plural($this->modelName); |
|
|
|
|