From 517debe77a64c84c56e141e2b1a04411c564c152 Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Sun, 27 Dec 2020 07:20:46 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Actions/Action.php | 2 +- tests/Actions/PerformActionsControllerTest.php | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Actions/Action.php b/src/Actions/Action.php index 06ad30b12..d3c30f554 100644 --- a/src/Actions/Action.php +++ b/src/Actions/Action.php @@ -44,7 +44,7 @@ abstract class Action extends RestController implements JsonSerializable public static function indexQuery(RestifyRequest $request, $query) { - // + // } /** diff --git a/tests/Actions/PerformActionsControllerTest.php b/tests/Actions/PerformActionsControllerTest.php index bac451462..13080461e 100644 --- a/tests/Actions/PerformActionsControllerTest.php +++ b/tests/Actions/PerformActionsControllerTest.php @@ -3,8 +3,6 @@ namespace Binaryk\LaravelRestify\Tests\Actions; use Binaryk\LaravelRestify\Actions\Action; -use Binaryk\LaravelRestify\Http\Requests\ActionRequest; -use Binaryk\LaravelRestify\Tests\Fixtures\Post\Post; use Binaryk\LaravelRestify\Tests\Fixtures\Post\PostRepository; use Binaryk\LaravelRestify\Tests\Fixtures\Post\PublishPostAction; use Binaryk\LaravelRestify\Tests\Fixtures\User\ActivateAction; @@ -25,7 +23,7 @@ public function test_could_perform_action_for_multiple_repositories() { $post = $this->mockPosts(1, 2); - $this->post('posts/action?action=' . (new PublishPostAction())->uriKey(), [ + $this->post('posts/action?action='.(new PublishPostAction())->uriKey(), [ 'repositories' => [ $post->first()->id, $post->last()->id, @@ -57,15 +55,14 @@ public function handle(Request $request, Collection $collection) 'fromHandle' => $collection->count(), ]); } - } + }, ]); $this->post('posts/action?action=publish', [ - 'repositories' => 'all' + 'repositories' => 'all', ])->assertOk()->assertJsonFragment([ 'fromHandle' => 0, ]); - } public function test_cannot_apply_a_show_action_to_index() @@ -75,7 +72,7 @@ public function test_cannot_apply_a_show_action_to_index() $_SERVER['actions.posts.invalidate'] = true; $_SERVER['actions.posts.publish.onlyOnShow'] = true; - $this->post('posts/action?action=' . (new PublishPostAction())->uriKey(), [ + $this->post('posts/action?action='.(new PublishPostAction())->uriKey(), [ 'repositories' => [ $post->first()->id, $post->last()->id, @@ -91,7 +88,7 @@ public function test_show_action_not_need_repositories() { $users = $this->mockUsers(); - $this->post('users/' . $users->first()->id . '/action?action=' . (new ActivateAction)->uriKey()) + $this->post('users/'.$users->first()->id.'/action?action='.(new ActivateAction)->uriKey()) ->assertSuccessful() ->assertJsonStructure([ 'data', @@ -102,7 +99,7 @@ public function test_show_action_not_need_repositories() public function test_could_perform_standalone_action() { - $this->post('users/action?action=' . (new DisableProfileAction())->uriKey()) + $this->post('users/action?action='.(new DisableProfileAction())->uriKey()) ->assertSuccessful() ->assertJsonStructure([ 'data',