|
@@ -35,7 +35,7 @@ discard block |
|
|
block discarded – undo |
|
35
|
35
|
public function create()
|
|
36
|
36
|
{
|
|
37
|
37
|
|
|
38
|
|
- if(!file_exists(app()->path()->tests())){
|
|
|
38
|
+ if (!file_exists(app()->path()->tests())) {
|
|
39
|
39
|
$this->directory['test'] = app()->path()->tests();
|
|
40
|
40
|
$this->file->makeDirectory($this);
|
|
41
|
41
|
}
|
|
@@ -44,7 +44,7 @@ discard block |
|
|
block discarded – undo |
|
44
|
44
|
$this->argument['testNamespace'] = ucfirst($this->argument['test']).'Test';
|
|
45
|
45
|
$this->argument['projectName'] = strtolower($this->projectName());
|
|
46
|
46
|
|
|
47
|
|
- $this->touch['test/test']= app()->path()->tests().'/'.$this->argument['testNamespace'].'.php';
|
|
|
47
|
+ $this->touch['test/test'] = app()->path()->tests().'/'.$this->argument['testNamespace'].'.php';
|
|
48
|
48
|
|
|
49
|
49
|
|
|
50
|
50
|
$this->file->touch($this);
|
|
@@ -63,12 +63,12 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
|
|
64
|
64
|
$array = $xml->toArray();
|
|
65
|
65
|
|
|
66
|
|
- $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()),'directory',
|
|
67
|
|
- str_replace(root.''.DIRECTORY_SEPARATOR,"",app()->path()->tests()));
|
|
|
66
|
+ $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()), 'directory',
|
|
|
67
|
+ str_replace(root.''.DIRECTORY_SEPARATOR, "", app()->path()->tests()));
|
|
68
|
68
|
|
|
69
|
69
|
$newDataXml = $xml->toXml($new);
|
|
70
|
70
|
|
|
71
|
|
- app()->get('fileSystem')->writeFile($phpunit,$newDataXml);
|
|
|
71
|
+ app()->get('fileSystem')->writeFile($phpunit, $newDataXml);
|
|
72
|
72
|
|
|
73
|
73
|
echo $this->classical(' > phpunit.xml file has been updated');
|
|
74
|
74
|
}
|
|
@@ -78,7 +78,7 @@ discard block |
|
|
block discarded – undo |
|
78
|
78
|
*/
|
|
79
|
79
|
public function run()
|
|
80
|
80
|
{
|
|
81
|
|
- $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit','--group',strtolower($this->projectName())]);
|
|
|
81
|
+ $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit', '--group', strtolower($this->projectName())]);
|
|
82
|
82
|
$process->setTty(true);
|
|
83
|
83
|
|
|
84
|
84
|
try {
|