Skip to content

Commit a61a1ab

Browse files
committed
Lint fix
1 parent f059f68 commit a61a1ab

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

tests/ConnectionTest.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5+
use Elastic\Elasticsearch\Client;
56
use Illuminate\Support\Facades\DB;
67
use PDPhilip\Elasticsearch\Connection;
78
use PDPhilip\Elasticsearch\Schema\Builder as SchemaBuilder;
8-
use Elastic\Elasticsearch\Client;
99

1010
test('Connection', function () {
1111
$connection = DB::connection('elasticsearch');
@@ -27,56 +27,56 @@
2727
});
2828

2929
test('Disconnect And Create New Connection', function () {
30-
$connection = DB::connection('elasticsearch');
31-
expect($connection)->toBeInstanceOf(Connection::class);
32-
$client = $connection->getClient();
33-
expect($client)->toBeInstanceOf(Client::class);
30+
$connection = DB::connection('elasticsearch');
31+
expect($connection)->toBeInstanceOf(Connection::class);
32+
$client = $connection->getClient();
33+
expect($client)->toBeInstanceOf(Client::class);
3434

35-
$connection->disconnect();
36-
$client = $connection->getClient();
37-
expect($client)->toBeNull();
38-
DB::purge('elasticsearch');
35+
$connection->disconnect();
36+
$client = $connection->getClient();
37+
expect($client)->toBeNull();
38+
DB::purge('elasticsearch');
3939

40-
$connection = DB::connection('elasticsearch');
41-
expect($connection)->toBeInstanceOf(Connection::class);
42-
$client = $connection->getClient();
43-
expect($client)->toBeInstanceOf(Client::class);
40+
$connection = DB::connection('elasticsearch');
41+
expect($connection)->toBeInstanceOf(Connection::class);
42+
$client = $connection->getClient();
43+
expect($client)->toBeInstanceOf(Client::class);
4444

4545
});
4646

4747
test('DB', function () {
48-
$connection = DB::connection('elasticsearch');
49-
expect($connection->getClient())->toBeInstanceOf(Client::class);
48+
$connection = DB::connection('elasticsearch');
49+
expect($connection->getClient())->toBeInstanceOf(Client::class);
5050
});
5151

5252
test('Connection Without auth_type', function () {
53-
new Connection(['name' => 'test']);
53+
new Connection(['name' => 'test']);
5454
})->throws(RuntimeException::class, 'Invalid [auth_type] in database config. Must be: http or cloud');
5555

5656
test('Cloud Connection Without cloud_id', function () {
57-
$this->expectException(RuntimeException::class);
57+
$this->expectException(RuntimeException::class);
5858

59-
new Connection(['name' => 'test', 'auth_type' => 'cloud']);
59+
new Connection(['name' => 'test', 'auth_type' => 'cloud']);
6060
})->throws(RuntimeException::class, 'auth_type of `cloud` requires `cloud_id` to be set');
6161

6262
test('Http Connection Without hosts', function () {
63-
$this->expectException(RuntimeException::class);
64-
$this->expectExceptionMessage('auth_type of `http` requires `hosts` to be set');
63+
$this->expectException(RuntimeException::class);
64+
$this->expectExceptionMessage('auth_type of `http` requires `hosts` to be set');
6565

66-
new Connection(['name' => 'test', 'auth_type' => 'http']);
66+
new Connection(['name' => 'test', 'auth_type' => 'http']);
6767
})->throws(RuntimeException::class, 'auth_type of `http` requires `hosts` to be set and be an array');
6868

6969
test('Prefix', function () {
70-
$config = [
71-
'name' => 'test',
72-
'auth_type' => 'http',
73-
'hosts' => ['http://localhost:9200'],
74-
'index_prefix' => 'prefix_',
75-
];
70+
$config = [
71+
'name' => 'test',
72+
'auth_type' => 'http',
73+
'hosts' => ['http://localhost:9200'],
74+
'index_prefix' => 'prefix_',
75+
];
7676

77-
$connection = new Connection($config);
77+
$connection = new Connection($config);
7878

79-
expect($connection->getIndexPrefix())->toBe('prefix_');
79+
expect($connection->getIndexPrefix())->toBe('prefix_');
8080
});
8181

8282
test('Schema Builder', function () {
@@ -92,5 +92,5 @@
9292
test('Info', function () {
9393
$info = DB::connection('elasticsearch')->getClientInfo();
9494
expect($info['cluster_name'])->toBe('elasticsearch')
95-
->and($info['tagline'])->toBe('You Know, for Search');
95+
->and($info['tagline'])->toBe('You Know, for Search');
9696
});

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ protected function getEnvironmentSetUp($app): void
4646
'auth_type' => 'http',
4747
'hosts' => ['http://localhost:9200'],
4848
'options' => [
49-
'logging' => true
50-
]
49+
'logging' => true,
50+
],
5151
]);
5252
}
5353
}

0 commit comments

Comments
 (0)