I already tried to use Mockery to test my command but I got an error:
Mockery_0__Suomato_ArtisanVueCommands_Commands_GenerateVueComponent should be called exactly 1 times but called 0 times.
$command = m::mock(GenerateVueComponent::class); $command->shouldReceive('info')->once()->with('Component created successfully.'); $this->artisan('make:vue-component', ['name' => 'example', '--no-interaction' => true]);
I am working on a new Artisan command which help me(or you) to generate a new Vue component with boilerplate. Now the command works well and I would like to make some tests but I don't have a clue where to start. How I could / should test a custom Artisan command. I couldn't find any help Laravel documentation.
My custom Artisan command source code: https://github.com/suomato/laravel-vue-component-generator