File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/Magento/FunctionalTestingFramework/StaticCheck Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,11 @@ public function execute(InputInterface $input)
70
70
$ allTests = TestObjectHandler::getInstance (false )->getAllObjects ();
71
71
72
72
foreach ($ allTests as $ test ) {
73
+ if ($ this ->validateSkipIssueId ($ test )) {
74
+ //if test is skipped ignore other checks
75
+ continue ;
76
+ }
73
77
$ this ->validateRequiredAnnotations ($ test );
74
- $ this ->validateSkipIssueId ($ test );
75
78
$ this ->aggregateStoriesTitlePairs ($ test );
76
79
$ this ->aggregateTestCaseIdTitlePairs ($ test );
77
80
}
@@ -150,19 +153,22 @@ private function validateRequiredAnnotations($test)
150
153
* Validates that if the test is skipped, that it has an issueId value.
151
154
*
152
155
* @param TestObject $test
153
- * @return void
156
+ * @return boolean
154
157
*/
155
158
private function validateSkipIssueId ($ test )
156
159
{
160
+ $ validateSkipped = false ;
157
161
$ annotations = $ test ->getAnnotations ();
158
162
159
163
$ skip = $ annotations ['skip ' ] ?? null ;
160
164
if ($ skip !== null ) {
165
+ $ validateSkipped = true ;
161
166
$ issueId = $ skip [0 ] ?? null ;
162
167
if ($ issueId === null || strlen ($ issueId ) == 0 ) {
163
168
$ this ->errors [][] = "Test {$ test ->getName ()} is skipped but the issueId is empty. " ;
164
169
}
165
170
}
171
+ return $ validateSkipped ;
166
172
}
167
173
168
174
/**
You can’t perform that action at this time.
0 commit comments