Test Setup Failed
Push — master ( 691446...0e5a58 )
by Php Easy Api
03:49
created
src/resta/Console/Source/Test/Test.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.