From e19794c6031f3708a1b2cbcdd784a11197045fdd Mon Sep 17 00:00:00 2001 From: Jaspaul Bola Date: Thu, 30 Mar 2017 18:20:06 -0400 Subject: [PATCH] Output a success statement after deleting a feature flag --- src/Console/DeleteCommand.php | 1 + tests/Console/DeleteCommandTest.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Console/DeleteCommand.php b/src/Console/DeleteCommand.php index 23e7f8a..85f41b5 100644 --- a/src/Console/DeleteCommand.php +++ b/src/Console/DeleteCommand.php @@ -27,5 +27,6 @@ public function handle() { $name = $this->argument('feature'); $this->rollout->remove($name); + $this->line(sprintf("The '%s' flag was removed.", $name)); } } diff --git a/tests/Console/DeleteCommandTest.php b/tests/Console/DeleteCommandTest.php index 107aa3e..97423a1 100644 --- a/tests/Console/DeleteCommandTest.php +++ b/tests/Console/DeleteCommandTest.php @@ -5,6 +5,7 @@ use Tests\TestCase; use Opensoft\Rollout\Rollout; use Illuminate\Support\Facades\Artisan; +use Illuminate\Contracts\Console\Kernel; use Jaspaul\LaravelRollout\Drivers\Cache; class DeleteCommandTest extends TestCase @@ -29,4 +30,18 @@ function running_the_command_with_a_feature_will_remove_the_corresponding_featur $this->assertEquals('', $store->get('rollout.feature:__features__')); } + + /** + * @test + */ + function running_the_command_outputs_a_success_statement() + { + Artisan::call('rollout:delete', [ + 'feature' => 'derp' + ]); + + $output = $this->app[Kernel::class]->output(); + + $this->assertContains('derp', $output); + } }