File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -174,30 +174,32 @@ public function addTest(Test $test, array $groups = []): void
174
174
{
175
175
$ class = new ReflectionClass ($ test );
176
176
177
- if (! $ class ->isAbstract ()) {
178
- $ this -> tests [] = $ test ;
179
- $ this -> clearCaches ();
177
+ if ($ class ->isAbstract ()) {
178
+ return ;
179
+ }
180
180
181
- if ($ test instanceof self && empty ($ groups )) {
182
- $ groups = $ test ->groups ();
183
- }
181
+ $ this ->tests [] = $ test ;
182
+ $ this ->clearCaches ();
184
183
185
- if ( $ this -> containsOnlyVirtualGroups ($ groups )) {
186
- $ groups[] = ' default ' ;
187
- }
184
+ if ( $ test instanceof self && empty ($ groups )) {
185
+ $ groups = $ test -> groups () ;
186
+ }
188
187
189
- foreach ($ groups as $ group ) {
190
- if (!isset ($ this ->groups [$ group ])) {
191
- $ this ->groups [$ group ] = [$ test ];
192
- } else {
193
- $ this ->groups [$ group ][] = $ test ;
194
- }
195
- }
188
+ if ($ this ->containsOnlyVirtualGroups ($ groups )) {
189
+ $ groups [] = 'default ' ;
190
+ }
196
191
197
- if ($ test instanceof TestCase) {
198
- $ test ->setGroups ($ groups );
192
+ foreach ($ groups as $ group ) {
193
+ if (!isset ($ this ->groups [$ group ])) {
194
+ $ this ->groups [$ group ] = [$ test ];
195
+ } else {
196
+ $ this ->groups [$ group ][] = $ test ;
199
197
}
200
198
}
199
+
200
+ if ($ test instanceof TestCase) {
201
+ $ test ->setGroups ($ groups );
202
+ }
201
203
}
202
204
203
205
/**
You can’t perform that action at this time.
0 commit comments