@@ -81,12 +81,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int
81
81
// Delete the Codeception failed file just in case it exists from any previous test runs
82
82
$ this ->deleteFailedFile ();
83
83
84
- foreach ($ manifestFile as $ manifestLine ) {
85
- if (empty ($ manifestLine )) {
84
+ for ($ line = 0 ; $ line < count ( $ manifestFile ); $ line ++ ) {
85
+ if (empty ($ manifestFile [ $ line ] )) {
86
86
continue ;
87
87
}
88
88
89
- $ this ->runManifestLine ($ manifestLine , $ output );
89
+ if ($ line == count ($ manifestFile ) - 1 ) {
90
+ $ this ->runManifestLine ($ manifestFile [$ line ], $ output , true );
91
+ } else {
92
+ $ this ->runManifestLine ($ manifestFile [$ line ], $ output );
93
+ }
94
+
90
95
$ this ->aggregateFailed ();
91
96
}
92
97
@@ -103,18 +108,23 @@ protected function execute(InputInterface $input, OutputInterface $output): int
103
108
*
104
109
* @param string $manifestLine
105
110
* @param OutputInterface $output
111
+ * @param boolean $exit
106
112
* @return void
107
113
* @throws \Exception
108
114
*
109
115
* @SuppressWarnings(PHPMD.UnusedLocalVariable) Need this because of the unused $type variable in the closure
110
116
*/
111
- private function runManifestLine (string $ manifestLine , OutputInterface $ output )
117
+ private function runManifestLine ($ manifestLine , $ output, $ exit = false )
112
118
{
113
119
if (getenv ('ENABLE_PAUSE ' ) === 'true ' ) {
114
120
$ codeceptionCommand = BaseGenerateCommand::CODECEPT_RUN_FUNCTIONAL
115
- . '--verbose --steps --debug ' . $ manifestLine ;
121
+ . '--verbose --steps --debug ' ;
122
+ if (!$ exit ) {
123
+ $ codeceptionCommand .= BaseGenerateCommand::CODECEPT_RUN_OPTION_NO_EXIT ;
124
+ }
125
+ $ codeceptionCommand .= $ manifestLine ;
116
126
$ input = new StringInput ($ codeceptionCommand );
117
- $ command = $ this ->getApplication ()->find (' codecept:run ' );
127
+ $ command = $ this ->getApplication ()->find (BaseGenerateCommand:: CODECEPT_RUN );
118
128
$ subReturnCode = $ command ->run ($ input , $ output );
119
129
} else {
120
130
$ codeceptionCommand = realpath (PROJECT_ROOT . "/vendor/bin/codecept " )
0 commit comments