diff --git a/tests/Unit/DumpCommandTest.php b/tests/Unit/DumpCommandTest.php new file mode 100644 index 0000000..eeb1dec --- /dev/null +++ b/tests/Unit/DumpCommandTest.php @@ -0,0 +1,38 @@ +makePartial(); + $command->shouldReceive('dump')->with('Blog')->once(); + + $this->app[\Illuminate\Contracts\Console\Kernel::class]->registerCommand($command); + + $this->artisan('module:dump', ['module' => 'Blog']) + ->assertExitCode(0); + } + + public function test_it_dumps_all_modules() + { + $command = Mockery::mock(DumpCommand::class . '[dumpAll]')->makePartial(); + $command->shouldReceive('dumpAll')->once(); + + $this->app[\Illuminate\Contracts\Console\Kernel::class]->registerCommand($command); + + $this->artisan('module:dump') + ->assertExitCode(0); + } +}