From 2c450ccb2a222ab6c3329d39a42265d84c1c7334 Mon Sep 17 00:00:00 2001 From: Haydar KULEKCI Date: Wed, 20 Apr 2022 11:43:30 +0300 Subject: [PATCH] styleci fix for the Feature\ElasticSearchEngineTest --- tests/Feature/ElasticSearchEngineTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Feature/ElasticSearchEngineTest.php b/tests/Feature/ElasticSearchEngineTest.php index 0905d351..edb258ae 100644 --- a/tests/Feature/ElasticSearchEngineTest.php +++ b/tests/Feature/ElasticSearchEngineTest.php @@ -16,15 +16,14 @@ public function test_pass_empty_response(): void Product::unsetEventDispatcher(); $productsAmount = random_int(1, 5); - $products = factory(Product::class, $productsAmount)->states(['iphone'])->create(); + factory(Product::class, $productsAmount)->states(['iphone'])->create(); Product::setEventDispatcher($dispatcher); Artisan::call('scout:import'); - $results = Product::search('Quia', static function($client, $body) { + $results = Product::search('Quia', static function ($client, $body) { return $client->search(['index' => 'products', 'body' => $body->toArray()]); })->raw(); - $this->assertEmpty($results['hits']['hits']); } @@ -39,7 +38,7 @@ public function test_pass_with_response(): void Artisan::call('scout:import'); - $results = Product::search('iphone', static function($client, $body) { + $results = Product::search('iphone', static function ($client, $body) { return $client->search(['index' => 'products', 'body' => $body->toArray()]); })->raw();