@@ -273,11 +273,6 @@ public function testInlineHosts()
273
273
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
274
274
'localhost:9200 '
275
275
])->build ();
276
-
277
- // We're casting to Connection here, instead of ConnectionInterface
278
- // so we can access getHost() on Connection
279
-
280
- /** @var Connection $host */
281
276
$ host = $ client ->transport ->getConnection ();
282
277
$ this ->assertEquals ("localhost:9200 " , $ host ->getHost ());
283
278
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -286,23 +281,20 @@ public function testInlineHosts()
286
281
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
287
282
'http://localhost:9200 '
288
283
])->build ();
289
- /** @var Connection $host */
290
284
$ host = $ client ->transport ->getConnection ();
291
285
$ this ->assertEquals ("localhost:9200 " , $ host ->getHost ());
292
286
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
293
287
294
288
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
295
289
'http://foo.com:9200 '
296
290
])->build ();
297
- /** @var Connection $host */
298
291
$ host = $ client ->transport ->getConnection ();
299
292
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
300
293
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
301
294
302
295
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
303
296
'https://foo.com:9200 '
304
297
])->build ();
305
- /** @var Connection $host */
306
298
$ host = $ client ->transport ->getConnection ();
307
299
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
308
300
$ this ->assertEquals ("https " , $ host ->getTransportSchema ());
@@ -314,7 +306,6 @@ public function testInlineHosts()
314
306
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
315
307
'https://user:pass@foo.com:9200 '
316
308
])->build ();
317
- /** @var Connection $host */
318
309
$ host = $ client ->transport ->getConnection ();
319
310
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
320
311
$ this ->assertEquals ("https " , $ host ->getTransportSchema ());
@@ -329,7 +320,6 @@ public function testExtendedHosts()
329
320
'scheme ' => 'http '
330
321
]
331
322
])->build ();
332
- /** @var Connection $host */
333
323
$ host = $ client ->transport ->getConnection ();
334
324
$ this ->assertEquals ("localhost:9200 " , $ host ->getHost ());
335
325
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -342,7 +332,6 @@ public function testExtendedHosts()
342
332
'scheme ' => 'http '
343
333
]
344
334
])->build ();
345
- /** @var Connection $host */
346
335
$ host = $ client ->transport ->getConnection ();
347
336
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
348
337
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -355,7 +344,6 @@ public function testExtendedHosts()
355
344
'scheme ' => 'https '
356
345
]
357
346
])->build ();
358
- /** @var Connection $host */
359
347
$ host = $ client ->transport ->getConnection ();
360
348
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
361
349
$ this ->assertEquals ("https " , $ host ->getTransportSchema ());
@@ -367,7 +355,6 @@ public function testExtendedHosts()
367
355
'scheme ' => 'http '
368
356
]
369
357
])->build ();
370
- /** @var Connection $host */
371
358
$ host = $ client ->transport ->getConnection ();
372
359
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
373
360
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -378,7 +365,6 @@ public function testExtendedHosts()
378
365
'host ' => 'foo.com '
379
366
]
380
367
])->build ();
381
- /** @var Connection $host */
382
368
$ host = $ client ->transport ->getConnection ();
383
369
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
384
370
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -391,7 +377,6 @@ public function testExtendedHosts()
391
377
'scheme ' => 'https '
392
378
]
393
379
])->build ();
394
- /** @var Connection $host */
395
380
$ host = $ client ->transport ->getConnection ();
396
381
$ this ->assertEquals ("foo.com:9500 " , $ host ->getHost ());
397
382
$ this ->assertEquals ("https " , $ host ->getTransportSchema ());
@@ -415,7 +400,6 @@ public function testExtendedHosts()
415
400
'host ' => 'the_foo.com '
416
401
]
417
402
])->build ();
418
- /** @var Connection $host */
419
403
$ host = $ client ->transport ->getConnection ();
420
404
$ this ->assertEquals ("the_foo.com:9200 " , $ host ->getHost ());
421
405
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
@@ -429,7 +413,6 @@ public function testExtendedHosts()
429
413
'pass ' => 'abc#$%!abc '
430
414
]
431
415
])->build ();
432
- /** @var Connection $host */
433
416
$ host = $ client ->transport ->getConnection ();
434
417
$ this ->assertEquals ("foo.com:9200 " , $ host ->getHost ());
435
418
$ this ->assertEquals ("http " , $ host ->getTransportSchema ());
0 commit comments