@@ -71,23 +71,13 @@ public function testElasticCloudIdNotOverrideCurlEncoding()
7171 }
7272 }
7373
74- public function getHttpPorts ()
75- {
76- return [
77- [ 80 , false ], // not included since 80 is standard port for HTTP
78- [ 443 , false ], // not included since 442 is standard port for HTTPS
79- [ 1234 , true ] // included since 1234 is not a standard port
80- ];
81- }
82-
8374 /**
84- * @dataProvider getHttpPorts
8575 * @see https://github.com/elastic/elasticsearch-php/issues/993
8676 */
87- public function testIncludePortInHostHeader (int $ port , bool $ included )
77+ public function testIncludePortInHostHeader ()
8878 {
8979 $ host = "localhost " ;
90- $ url = "localhost: $ port " ;
80+ $ url = "$ host :1234 " ;
9181 $ params = [
9282 'client ' => [
9383 'verbose ' => true
@@ -106,14 +96,14 @@ public function testIncludePortInHostHeader(int $port, bool $included)
10696 } catch (ElasticsearchException $ e ) {
10797 $ request = $ client ->transport ->getLastConnection ()->getLastRequestInfo ();
10898 $ this ->assertTrue (isset ($ request ['request ' ]['headers ' ]['Host ' ][0 ]));
109- $ this ->assertEquals ($ included ? $ url : $ host , $ request ['request ' ]['headers ' ]['Host ' ][0 ]);
99+ $ this ->assertEquals ($ url , $ request ['request ' ]['headers ' ]['Host ' ][0 ]);
110100 }
111101 }
112102
113103 /**
114104 * @see https://github.com/elastic/elasticsearch-php/issues/993
115105 */
116- public function testNotIncludeStandardPortInHostHeaderAsDefault ()
106+ public function testNotIncludePortInHostHeaderAsDefault ()
117107 {
118108 $ host = "localhost " ;
119109 $ url = "$ host:1234 " ;
@@ -141,7 +131,7 @@ public function testNotIncludeStandardPortInHostHeaderAsDefault()
141131 /**
142132 * @see https://github.com/elastic/elasticsearch-php/issues/993
143133 */
144- public function testNotIncludeStandardPortInHostHeader ()
134+ public function testNotIncludePortInHostHeader ()
145135 {
146136 $ host = "localhost " ;
147137 $ url = "$ host:1234 " ;
0 commit comments