@@ -53,23 +53,23 @@ public function setUp(): void
5353 ->withHeader ('Content-Type ' , 'application/json ' );
5454 }
5555
56- public function testAsArray (): void
56+ public function testAsArray ()
5757 {
5858 $ array = ['foo ' => 'bar ' ];
5959 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
6060 $ this ->elasticsearch ->setResponse ($ this ->response200 ->withBody ($ body ));
6161 $ this ->assertEquals ($ array , $ this ->elasticsearch ->asArray ());
6262 }
6363
64- public function testAsString (): void
64+ public function testAsString ()
6565 {
6666 $ json = json_encode (['foo ' => 'bar ' ]);
6767 $ body = $ this ->psr17Factory ->createStream ($ json );
6868 $ this ->elasticsearch ->setResponse ($ this ->response200 ->withBody ($ body ));
6969 $ this ->assertEquals ($ json , $ this ->elasticsearch ->asString ());
7070 }
7171
72- public function testAsObject (): void
72+ public function testAsObject ()
7373 {
7474 $ json = json_encode (['foo ' => 'bar ' ]);
7575 $ body = $ this ->psr17Factory ->createStream ($ json );
@@ -79,13 +79,13 @@ public function testAsObject(): void
7979 $ this ->assertEquals ('bar ' , $ obj ->foo );
8080 }
8181
82- public function testAsBoolIsTrueWith200 (): void
82+ public function testAsBoolIsTrueWith200 ()
8383 {
8484 $ this ->elasticsearch ->setResponse ($ this ->response200 );
8585 $ this ->assertTrue ($ this ->elasticsearch ->asBool ());
8686 }
8787
88- public function testAsBoolIsFalseWith400 (): void
88+ public function testAsBoolIsFalseWith400 ()
8989 {
9090 $ this ->elasticsearch ->setResponse ($ this ->response400 , false );
9191 $ this ->assertFalse ($ this ->elasticsearch ->asBool ());
@@ -94,7 +94,7 @@ public function testAsBoolIsFalseWith400(): void
9494 /**
9595 * @covers Elastic\Elasticsearch\Response\Elasticsearch::__toString()
9696 */
97- public function testSerializeAsString (): void
97+ public function testSerializeAsString ()
9898 {
9999 $ json = json_encode (['foo ' => 'bar ' ]);
100100 $ body = $ this ->psr17Factory ->createStream ($ json );
@@ -105,12 +105,12 @@ public function testSerializeAsString(): void
105105 /**
106106 * @doesNotPerformAssertions
107107 */
108- public function testSetResponse (): void
108+ public function testSetResponse ()
109109 {
110110 $ this ->elasticsearch ->setResponse ($ this ->response200 );
111111 }
112112
113- public function testSetResponseFromUnknownSourceThrowProductCheckException (): void
113+ public function testSetResponseFromUnknownSourceThrowProductCheckException ()
114114 {
115115 $ response = $ this ->psr17Factory ->createResponse (200 )
116116 ->withHeader ('Content-Type ' , 'application/json ' );
@@ -119,13 +119,13 @@ public function testSetResponseFromUnknownSourceThrowProductCheckException(): vo
119119 $ this ->elasticsearch ->setResponse ($ response );
120120 }
121121
122- public function testSetResponseWith400ThrowException (): void
122+ public function testSetResponseWith400ThrowException ()
123123 {
124124 $ this ->expectException (ClientResponseException::class);
125125 $ this ->elasticsearch ->setResponse ($ this ->response400 );
126126 }
127127
128- public function testSetResponseWith500ThrowException (): void
128+ public function testSetResponseWith500ThrowException ()
129129 {
130130 $ this ->expectException (ServerResponseException::class);
131131 $ this ->elasticsearch ->setResponse ($ this ->response500 );
@@ -134,23 +134,23 @@ public function testSetResponseWith500ThrowException(): void
134134 /**
135135 * @doesNotPerformAssertions
136136 */
137- public function testSetResponseWith400AndThrowFalseDoesNotThrowException (): void
137+ public function testSetResponseWith400AndThrowFalseDoesNotThrowException ()
138138 {
139139 $ this ->elasticsearch ->setResponse ($ this ->response400 , false );
140140 }
141141
142142 /**
143143 * @doesNotPerformAssertions
144144 */
145- public function testSetResponseWith500AndThrowFalseDoesNotThrowException (): void
145+ public function testSetResponseWith500AndThrowFalseDoesNotThrowException ()
146146 {
147147 $ this ->elasticsearch ->setResponse ($ this ->response500 , false );
148148 }
149149
150150 /**
151151 * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetGet
152152 */
153- public function testAccessAsArray (): void
153+ public function testAccessAsArray ()
154154 {
155155 $ array = ['foo ' => 'bar ' ];
156156 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -162,7 +162,7 @@ public function testAccessAsArray(): void
162162 /**
163163 * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetExists
164164 */
165- public function testIsSetArrayAccess (): void
165+ public function testIsSetArrayAccess ()
166166 {
167167 $ array = ['foo ' => 'bar ' ];
168168 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -174,7 +174,7 @@ public function testIsSetArrayAccess(): void
174174 /**
175175 * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetSet
176176 */
177- public function testSetArrayAccessThrowException (): void
177+ public function testSetArrayAccessThrowException ()
178178 {
179179 $ array = ['foo ' => 'bar ' ];
180180 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -187,7 +187,7 @@ public function testSetArrayAccessThrowException(): void
187187 /**
188188 * @covers Elastic\Elasticsearch\Response\Elasticsearch::offsetSet
189189 */
190- public function testUnsetArrayAccessThrowException (): void
190+ public function testUnsetArrayAccessThrowException ()
191191 {
192192 $ array = ['foo ' => 'bar ' ];
193193 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -200,7 +200,7 @@ public function testUnsetArrayAccessThrowException(): void
200200 /**
201201 * @covers Elastic\Elasticsearch\Response\Elasticsearch::__get()
202202 */
203- public function testAccessAsObject (): void
203+ public function testAccessAsObject ()
204204 {
205205 $ array = ['foo ' => 'bar ' ];
206206 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -209,15 +209,15 @@ public function testAccessAsObject(): void
209209 $ this ->assertEquals ($ array ['foo ' ], $ this ->elasticsearch ->foo );
210210 }
211211
212- public function testWithStatusForPsr7Version1And2Compatibility (): void
212+ public function testWithStatusForPsr7Version1And2Compatibility ()
213213 {
214214 $ this ->elasticsearch ->setResponse ($ this ->response200 );
215215
216216 $ this ->elasticsearch = $ this ->elasticsearch ->withStatus (400 );
217217 $ this ->assertEquals (400 , $ this ->elasticsearch ->getStatusCode ());
218218 }
219219
220- public function testMapToStdClassAsDefault (): void
220+ public function testMapToStdClassAsDefault ()
221221 {
222222 $ array = [
223223 'columns ' => [
@@ -242,7 +242,7 @@ public function testMapToStdClassAsDefault(): void
242242 $ this ->assertEquals (DateTime::class, get_class ($ iterator [1 ]->b ));
243243 }
244244
245- public function testMapToStdClass (): void
245+ public function testMapToStdClass ()
246246 {
247247 $ array = [
248248 'columns ' => [
@@ -263,7 +263,7 @@ public function testMapToStdClass(): void
263263 $ this ->assertEquals (stdClass::class, get_class ($ iterator [1 ]));
264264 }
265265
266- public function testMapToWithoutEsqlResponseWillThrowException (): void
266+ public function testMapToWithoutEsqlResponseWillThrowException ()
267267 {
268268 $ array = ['foo ' => 'bar ' ];
269269 $ body = $ this ->psr17Factory ->createStream (json_encode ($ array ));
@@ -273,7 +273,7 @@ public function testMapToWithoutEsqlResponseWillThrowException(): void
273273 $ iterator = $ this ->elasticsearch ->mapTo ();
274274 }
275275
276- public function testMapToCustomClass (): void
276+ public function testMapToCustomClass ()
277277 {
278278 $ array = [
279279 'columns ' => [
@@ -297,26 +297,26 @@ public function testMapToCustomClass(): void
297297 $ this ->assertEquals ('' , $ iterator [0 ]->c );
298298 }
299299
300- public function testIsServerlessFalseByDefault (): void
300+ public function testIsServerlessFalseByDefault ()
301301 {
302302 $ this ->assertFalse ($ this ->elasticsearch ->isServerless ());
303303 }
304304
305- public function testIsServerlessTrueWithServerlessResponse (): void
305+ public function testIsServerlessTrueWithServerlessResponse ()
306306 {
307307 $ this ->elasticsearch ->setResponse (
308308 $ this ->response200 ->withHeader (Client::API_VERSION_HEADER , Client::API_VERSION )
309309 );
310310 $ this ->assertTrue ($ this ->elasticsearch ->isServerless ());
311311 }
312312
313- public function testIsServerlessFalseIfNotServerlessResponse (): void
313+ public function testIsServerlessFalseIfNotServerlessResponse ()
314314 {
315315 $ this ->elasticsearch ->setResponse ($ this ->response200 );
316316 $ this ->assertFalse ($ this ->elasticsearch ->isServerless ());
317317 }
318318
319- public function testCacheIsClearedOnSetResponse (): void
319+ public function testCacheIsClearedOnSetResponse ()
320320 {
321321 $ firstBody = $ this ->psr17Factory ->createStream (json_encode (['foo ' => 'bar ' ]));
322322 $ this ->elasticsearch ->setResponse ($ this ->response200 ->withBody ($ firstBody ));
0 commit comments