File tree 2 files changed +22
-4
lines changed
src/Magento/FunctionalTestingFramework
2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,19 @@ public function getFilename()
88
88
return $ this ->filename ;
89
89
}
90
90
91
+ /**
92
+ * Getter for the skip_test boolean
93
+ *
94
+ * @return string
95
+ */
96
+ public function isSkipped ()
97
+ {
98
+ if (array_key_exists ('group ' , $ this ->annotations ) && (in_array ("skip " , $ this ->annotations ['group ' ]))) {
99
+ return true ;
100
+ }
101
+ return false ;
102
+ }
103
+
91
104
/**
92
105
* Getter for Codeception format name
93
106
*
Original file line number Diff line number Diff line change @@ -1507,10 +1507,15 @@ private function generateTestPhp($test)
1507
1507
$ testName = str_replace (' ' , '' , $ testName );
1508
1508
$ testAnnotations = $ this ->generateAnnotationsPhp ($ test ->getAnnotations (), true );
1509
1509
$ dependencies = 'AcceptanceTester $I ' ;
1510
- try {
1511
- $ steps = $ this ->generateStepsPhp ($ test ->getOrderedActions ());
1512
- } catch (TestReferenceException $ e ) {
1513
- throw new TestReferenceException ($ e ->getMessage () . " in Test \"" . $ test ->getName () . "\"" );
1510
+ if ($ test ->isSkipped ()) {
1511
+ $ steps = "\t\t" . '$scenario->skip("This test is skipped"); ' . "\n" ;
1512
+ $ dependencies .= ', \Codeception\Scenario $scenario ' ;
1513
+ } else {
1514
+ try {
1515
+ $ steps = $ this ->generateStepsPhp ($ test ->getOrderedActions ());
1516
+ } catch (TestReferenceException $ e ) {
1517
+ throw new TestReferenceException ($ e ->getMessage () . " in Test \"" . $ test ->getName () . "\"" );
1518
+ }
1514
1519
}
1515
1520
1516
1521
$ testPhp .= $ testAnnotations ;
You can’t perform that action at this time.
0 commit comments