@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function create() |
| 36 | 36 | {
|
| 37 | - if(isset($this->argument['controller'])){
|
|
| 37 | + if (isset($this->argument['controller'])) {
|
|
| 38 | 38 | $this->argument['test'] = $this->argument['controller']; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $type = (isset($this->argument['type'])) ? $this->argument['type'] : 'Unit'; |
| 42 | 42 | |
| 43 | - if(!file_exists(app()->path()->tests())){
|
|
| 43 | + if (!file_exists(app()->path()->tests())) {
|
|
| 44 | 44 | $this->directory['test'] = app()->path()->tests(); |
| 45 | 45 | $this->file->makeDirectory($this); |
| 46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $dirWithType = app()->path()->tests().'/'.$type; |
| 49 | 49 | |
| 50 | 50 | |
| 51 | - if(!file_exists($dirWithType)){
|
|
| 51 | + if (!file_exists($dirWithType)) {
|
|
| 52 | 52 | $this->directory['testType'] = $dirWithType; |
| 53 | 53 | $this->file->makeDirectory($this); |
| 54 | 54 | } |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | $this->argument['testNamespace'] = ucfirst($this->argument['test']).'Test'; |
| 59 | 59 | $this->argument['projectName'] = strtolower($this->projectName()); |
| 60 | 60 | |
| 61 | - if(isset($this->argument['controller']) && is_string($this->argument['controller'])){
|
|
| 61 | + if (isset($this->argument['controller']) && is_string($this->argument['controller'])) {
|
|
| 62 | 62 | |
| 63 | 63 | $this->argument['controllerForHttpRequest'] = strtolower($this->argument['controller']); |
| 64 | - $this->touch['test/testforcontroller']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 64 | + $this->touch['test/testforcontroller'] = $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 65 | 65 | } |
| 66 | - else{
|
|
| 67 | - $this->touch['test/test']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 66 | + else {
|
|
| 67 | + $this->touch['test/test'] = $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $array = $xml->toArray(); |
| 87 | 87 | |
| 88 | - $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()),'directory', |
|
| 89 | - str_replace(root.''.DIRECTORY_SEPARATOR,"",app()->path()->tests())); |
|
| 88 | + $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()), 'directory', |
|
| 89 | + str_replace(root.''.DIRECTORY_SEPARATOR, "", app()->path()->tests())); |
|
| 90 | 90 | |
| 91 | 91 | $newDataXml = $xml->toXml($new); |
| 92 | 92 | |
| 93 | - app()->get('fileSystem')->writeFile($phpunit,$newDataXml);
|
|
| 93 | + app()->get('fileSystem')->writeFile($phpunit, $newDataXml);
|
|
| 94 | 94 | |
| 95 | 95 | echo $this->classical(' > phpunit.xml file has been updated');
|
| 96 | 96 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function run() |
| 102 | 102 | {
|
| 103 | - $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit','--group',strtolower($this->projectName())]); |
|
| 103 | + $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit', '--group', strtolower($this->projectName())]); |
|
| 104 | 104 | $process->setTty(true); |
| 105 | 105 | |
| 106 | 106 | try {
|
@@ -62,8 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | $this->argument['controllerForHttpRequest'] = strtolower($this->argument['controller']); |
| 64 | 64 | $this->touch['test/testforcontroller']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
| 65 | - } |
|
| 66 | - else{
|
|
| 65 | + } else{
|
|
| 67 | 66 | $this->touch['test/test']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
| 68 | 67 | } |
| 69 | 68 | |