@@ -277,6 +277,7 @@ public function testInlineHosts()
277
277
])->build ();
278
278
$ host = $ client ->transport ->getConnection ();
279
279
$ this ->assertSame ("localhost " , $ host ->getHost ());
280
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
280
281
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
281
282
282
283
@@ -285,20 +286,23 @@ public function testInlineHosts()
285
286
])->build ();
286
287
$ host = $ client ->transport ->getConnection ();
287
288
$ this ->assertSame ("localhost " , $ host ->getHost ());
289
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
288
290
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
289
291
290
292
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
291
293
'http://foo.com:9200 '
292
294
])->build ();
293
295
$ host = $ client ->transport ->getConnection ();
294
296
$ this ->assertSame ("foo.com " , $ host ->getHost ());
297
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
295
298
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
296
299
297
300
$ client = Elasticsearch \ClientBuilder::create ()->setHosts ([
298
301
'https://foo.com:9200 '
299
302
])->build ();
300
303
$ host = $ client ->transport ->getConnection ();
301
304
$ this ->assertSame ("foo.com " , $ host ->getHost ());
305
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
302
306
$ this ->assertSame ("https " , $ host ->getTransportSchema ());
303
307
304
308
@@ -307,6 +311,7 @@ public function testInlineHosts()
307
311
])->build ();
308
312
$ host = $ client ->transport ->getConnection ();
309
313
$ this ->assertSame ("foo.com " , $ host ->getHost ());
314
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
310
315
$ this ->assertSame ("https " , $ host ->getTransportSchema ());
311
316
$ this ->assertSame ("user:pass " , $ host ->getUserPass ());
312
317
}
@@ -322,6 +327,7 @@ public function testExtendedHosts()
322
327
])->build ();
323
328
$ host = $ client ->transport ->getConnection ();
324
329
$ this ->assertSame ("localhost " , $ host ->getHost ());
330
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
325
331
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
326
332
327
333
@@ -334,6 +340,7 @@ public function testExtendedHosts()
334
340
])->build ();
335
341
$ host = $ client ->transport ->getConnection ();
336
342
$ this ->assertSame ("foo.com " , $ host ->getHost ());
343
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
337
344
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
338
345
339
346
@@ -346,6 +353,7 @@ public function testExtendedHosts()
346
353
])->build ();
347
354
$ host = $ client ->transport ->getConnection ();
348
355
$ this ->assertSame ("foo.com " , $ host ->getHost ());
356
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
349
357
$ this ->assertSame ("https " , $ host ->getTransportSchema ());
350
358
351
359
@@ -357,6 +365,7 @@ public function testExtendedHosts()
357
365
])->build ();
358
366
$ host = $ client ->transport ->getConnection ();
359
367
$ this ->assertSame ("foo.com " , $ host ->getHost ());
368
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
360
369
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
361
370
362
371
@@ -367,6 +376,7 @@ public function testExtendedHosts()
367
376
])->build ();
368
377
$ host = $ client ->transport ->getConnection ();
369
378
$ this ->assertSame ("foo.com " , $ host ->getHost ());
379
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
370
380
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
371
381
372
382
@@ -379,6 +389,7 @@ public function testExtendedHosts()
379
389
])->build ();
380
390
$ host = $ client ->transport ->getConnection ();
381
391
$ this ->assertSame ("foo.com " , $ host ->getHost ());
392
+ $ this ->assertSame ("9500 " , $ host ->getPort ());
382
393
$ this ->assertSame ("https " , $ host ->getTransportSchema ());
383
394
384
395
@@ -402,6 +413,7 @@ public function testExtendedHosts()
402
413
])->build ();
403
414
$ host = $ client ->transport ->getConnection ();
404
415
$ this ->assertSame ("the_foo.com " , $ host ->getHost ());
416
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
405
417
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
406
418
407
419
@@ -415,6 +427,7 @@ public function testExtendedHosts()
415
427
])->build ();
416
428
$ host = $ client ->transport ->getConnection ();
417
429
$ this ->assertSame ("foo.com " , $ host ->getHost ());
430
+ $ this ->assertSame ("9200 " , $ host ->getPort ());
418
431
$ this ->assertSame ("http " , $ host ->getTransportSchema ());
419
432
$ this ->assertSame ("user:abc#$@?%!abc " , $ host ->getUserPass ());
420
433
}
0 commit comments