Skip to content

Commit 8a7ebf8

Browse files
add coverage, profile and parallel options to Test command
1 parent 9be2ad5 commit 8a7ebf8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Core/Commands/Test.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class Test extends Command
1212

1313
protected $signature = 'module:test {module}
1414
{--l|list : Get tests list}
15+
{--profile : Lists top 10 slowest tests}
16+
{--coverage : Indicates whether code coverage information should be collected}
17+
{--p|parallel : Indicates if the tests should run in parallel}
1518
{--s|stop-on-failure : Stop all tests on the failure status}
1619
{--f|filter= : Test name (example: UserTest)}';
1720

@@ -28,8 +31,11 @@ protected function exec()
2831
} else {
2932
if ($filter = $this->option('filter')) $command .= ' --filter=' . $filter;
3033
if ($this->option('stop-on-failure')) $command .= ' --stop-on-failure';
34+
if ($this->option('coverage')) $command .= ' --coverage';
35+
if ($this->option('profile')) $command .= ' --profile';
36+
if ($this->option('parallel')) $command .= ' --parallel';
3137
}
32-
38+
3339
$process = Process::fromShellCommandline($command);
3440
$process->setPty(true);
3541
$process->run();

0 commit comments

Comments
 (0)