File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Illuminate/Foundation/Testing Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,10 @@ public function run()
131
131
{
132
132
$ this ->hasExecuted = true ;
133
133
134
- $ this ->mockConsoleOutput ();
134
+ $ mock = $ this ->mockConsoleOutput ();
135
135
136
136
try {
137
- $ exitCode = $ this ->app [Kernel::class]->call ($ this ->command , $ this ->parameters );
137
+ $ exitCode = $ this ->app [Kernel::class]->call ($ this ->command , $ this ->parameters , $ mock );
138
138
} catch (NoMatchingExpectationException $ e ) {
139
139
if ($ e ->getMethodName () === 'askQuestion ' ) {
140
140
$ this ->test ->fail ('Unexpected question " ' .$ e ->getActualArguments ()[0 ]->getQuestion ().'" was asked. ' );
@@ -156,7 +156,7 @@ public function run()
156
156
/**
157
157
* Mock the application's console output.
158
158
*
159
- * @return void
159
+ * @return \Mockery\MockInterface
160
160
*/
161
161
protected function mockConsoleOutput ()
162
162
{
@@ -181,6 +181,8 @@ protected function mockConsoleOutput()
181
181
$ this ->app ->bind (OutputStyle::class, function () use ($ mock ) {
182
182
return $ mock ;
183
183
});
184
+
185
+ return $ mock ;
184
186
}
185
187
186
188
/**
You can’t perform that action at this time.
0 commit comments