It is not possible to mock the Artisan Facade to test command calls.
Mockery\Exception: The class \Orchestra\Testbench\Console\Kernel is marked final and its methods cannot be replaced. Classes marked final can be passed in to \Mockery::mock() as instantiated objects to create a partial mock, but only if the mock is not subject to type hinting checks.
Is there a specific reason that this class is final, otherwise we could just remove the final keyword.
Description:
It is not possible to mock the Artisan Facade to test command calls.
Is there a specific reason that this class is final, otherwise we could just remove the final keyword.
Steps To Reproduce:
Artisan::shouldReceive("call")->with("backup:run")->andReturn(Command::SUCCESS)->once();