diff --git a/tests/Controllers/RepositoryFilterControllerTest.php b/tests/Controllers/RepositoryFilterControllerTest.php index bbe98b7df..f5c535799 100644 --- a/tests/Controllers/RepositoryFilterControllerTest.php +++ b/tests/Controllers/RepositoryFilterControllerTest.php @@ -24,8 +24,8 @@ public function test_can_get_available_filters() public function test_the_boolean_filter_is_applied() { - factory(Post::class)->create(['is_active' => false,]); - factory(Post::class)->create(['is_active' => true,]); + factory(Post::class)->create(['is_active' => false]); + factory(Post::class)->create(['is_active' => true]); $filters = base64_encode(json_encode([ [ @@ -33,12 +33,12 @@ public function test_the_boolean_filter_is_applied() 'value' => [ 'is_active' => false, ], - ] + ], ])); $response = $this ->withoutExceptionHandling() - ->getJson('restify-api/posts?filters=' . $filters) + ->getJson('restify-api/posts?filters='.$filters) ->dump() ->assertStatus(200); @@ -47,19 +47,19 @@ public function test_the_boolean_filter_is_applied() public function test_the_select_filter_is_applied() { - factory(Post::class)->create(['category' => 'movie',]); - factory(Post::class)->create(['category' => 'article',]); + factory(Post::class)->create(['category' => 'movie']); + factory(Post::class)->create(['category' => 'article']); $filters = base64_encode(json_encode([ [ 'class' => SelectCategoryFilter::class, - 'value' => 'article' - ] + 'value' => 'article', + ], ])); $response = $this ->withExceptionHandling() - ->getJson('restify-api/posts?filters=' . $filters) + ->getJson('restify-api/posts?filters='.$filters) ->assertStatus(200); $this->assertCount(1, $response->json('data')); @@ -67,8 +67,8 @@ public function test_the_select_filter_is_applied() public function test_the_timestamp_filter_is_applied() { - factory(Post::class)->create(['created_at' => now()->addYear(),]); - factory(Post::class)->create(['created_at' => now()->subYear(),]); + factory(Post::class)->create(['created_at' => now()->addYear()]); + factory(Post::class)->create(['created_at' => now()->subYear()]); $filters = base64_encode(json_encode([ [ @@ -78,12 +78,12 @@ public function test_the_timestamp_filter_is_applied() [ 'class' => CreatedAfterDateFilter::class, 'value' => now()->addWeek()->timestamp, - ] + ], ])); $response = $this ->withExceptionHandling() - ->getJson('restify-api/posts?filters=' . $filters) + ->getJson('restify-api/posts?filters='.$filters) ->assertStatus(200); $this->assertCount(1, $response->json('data'));