Skip to content

Commit 7513797

Browse files
committed
Support testing all plugins or all modules
1 parent 8093c30 commit 7513797

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

modules/system/console/WinterTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public function handle()
104104
foreach (['module', 'plugin'] as $type) {
105105
if ($this->option($type)) {
106106
foreach ($this->option($type) as $target) {
107+
if (empty($target)) {
108+
continue;
109+
}
107110
$target = strtolower($target);
108111
if (!isset($configs[$type . 's'][$target])) {
109112
throw new ApplicationException(sprintf(
@@ -126,7 +129,14 @@ public function handle()
126129
}
127130

128131
// default to running all defined configs found
129-
foreach (['modules', 'plugins'] as $type) {
132+
$types = [
133+
'modules' => count($this->option('module')),
134+
'plugins' => count($this->option('plugin')),
135+
];
136+
foreach ($types as $type => $count) {
137+
if (!$count) {
138+
continue;
139+
}
130140
foreach ($configs[$type] as $name => $config) {
131141
$this->info(
132142
$type === 'plugins'

0 commit comments

Comments
 (0)