File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 268268 $ this ->schemaManager ->deleteCollection ($ collection );
269269});
270270
271+
272+ test ('connect ' , function () {
273+ $ oldHttpClient = $ this ->arangoClient ->getHttpClient ();
274+ $ oldHttpClientObjectId = spl_object_id ($ oldHttpClient );
275+
276+ $ newConfig = [
277+ 'endpoint ' => 'http://localhost:8529 ' ,
278+ 'version ' => 2 ,
279+ 'connection ' => 'Close ' ,
280+ 'username ' => 'root ' ,
281+ 'password ' => null ,
282+ 'database ' => $ this ->testDatabaseName ,
283+ 'jsonStreamDecoderThreshold ' => 1048576 ,
284+ ];
285+
286+ $ this ->arangoClient ->connect ($ newConfig );
287+
288+ $ newHttpClient = $ this ->arangoClient ->getHttpClient ();
289+ $ newHttpClientObjectId = spl_object_id ($ newHttpClient );
290+
291+ expect ($ oldHttpClientObjectId )->not ()->toBe ($ newHttpClientObjectId );
292+
293+ $ this ->arangoClient ->setHttpClient ($ oldHttpClient );
294+ });
295+
296+
297+
271298test ('disconnect ' , function () {
272299 $ disconnected = $ this ->arangoClient ->disconnect ();
273300
You can’t perform that action at this time.
0 commit comments