diff --git a/src/Illuminate/Testing/PendingCommand.php b/src/Illuminate/Testing/PendingCommand.php index 9eb5a328b133..2df118e5e5b0 100644 --- a/src/Illuminate/Testing/PendingCommand.php +++ b/src/Illuminate/Testing/PendingCommand.php @@ -310,7 +310,7 @@ private function createABufferedOutputMock() */ private function applyTableOutputExpectations($mock) { - foreach ($this->test->expectedTables as $consoleTable) { + foreach ($this->test->expectedTables as $index => $consoleTable) { $table = (new Table($output = new BufferedOutput)) ->setHeaders($consoleTable['headers']) ->setRows($consoleTable['rows']) @@ -329,6 +329,8 @@ private function applyTableOutputExpectations($mock) foreach ($lines as $line) { $this->expectsOutput($line); } + + unset($this->test->expectedTables[$index]); } }