Skip to content

Commit

Permalink
Update tests: support classes without input
Browse files Browse the repository at this point in the history
Such as `Illuminate\Console\View\Components\Factory`
  • Loading branch information
JosephSilber committed Feb 6, 2023
1 parent 2c08082 commit 38cc3f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Concerns/TestsConsoleCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ protected function laravel()
});

$laravel->shouldReceive('make')->andReturnUsing(function ($class, $arguments) {
if (empty($arguments['input'])) {
return new $class($arguments['output']);
}

return new $class($arguments['input'], $arguments['output']);
});

Expand Down

0 comments on commit 38cc3f3

Please sign in to comment.