Skip to content

Commit 3657e87

Browse files
author
Deploy
committed
fix: connect returns true upon success
1 parent 49f2346 commit 3657e87

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ArangoClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ public function __construct(array $config = [], ?GuzzleClient $httpClient = null
5555
*
5656
* @throws UnknownProperties
5757
*/
58-
public function connect(array $config = [], ?GuzzleClient $httpClient = null): void
58+
public function connect(array $config = [], ?GuzzleClient $httpClient = null): bool
5959
{
6060
$config['endpoint'] = $this->generateEndpoint($config);
6161
$this->config = new HttpClientConfig($config);
6262

6363
$this->httpClient = $httpClient ?? new GuzzleClient($this->config->mapGuzzleHttpClientConfig());
64+
65+
return true;
6466
}
6567

6668
/**

tests/ArangoClientTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,13 @@
283283
'jsonStreamDecoderThreshold' => 1048576,
284284
];
285285

286-
$this->arangoClient->connect($newConfig);
286+
$response = $this->arangoClient->connect($newConfig);
287287

288288
$newHttpClient = $this->arangoClient->getHttpClient();
289289
$newHttpClientObjectId = spl_object_id($newHttpClient);
290290

291291
expect($oldHttpClientObjectId)->not()->toBe($newHttpClientObjectId);
292+
expect($response)->toBeTrue();
292293

293294
$this->arangoClient->setHttpClient($oldHttpClient);
294295
});

0 commit comments

Comments
 (0)