@@ -75,15 +75,15 @@ public function setUp()
7575 public function executeGet ()
7676 {
7777 $ guzzleResponse = $ this ->getValidResponse ();
78- $ mockHandler = new MockHandler ([ $ guzzleResponse] );
78+ $ mockHandler = new MockHandler (array ( $ guzzleResponse) );
7979
80- $ container = [] ;
80+ $ container = array () ;
8181 $ history = Middleware::history ($ container );
8282
8383 $ stack = HandlerStack::create ($ mockHandler );
8484 $ stack ->push ($ history );
8585
86- $ adapter = new GuzzleAdapter ([ 'handler ' => $ stack] );
86+ $ adapter = new GuzzleAdapter (array ( 'handler ' => $ stack) );
8787
8888 $ request = new Request ();
8989 $ request ->setMethod (Request::METHOD_GET );
@@ -96,11 +96,11 @@ public function executeGet()
9696 $ this ->assertSame ('OK ' , $ response ->getStatusMessage ());
9797 $ this ->assertSame ('200 ' , $ response ->getStatusCode ());
9898 $ this ->assertSame (
99- [
99+ array (
100100 'HTTP/1.1 200 OK ' ,
101101 'Content-Type: application/json ' ,
102102 'X-PHPUnit: response value ' ,
103- ] ,
103+ ) ,
104104 $ response ->getHeaders ()
105105 );
106106 $ this ->assertSame ((string )$ guzzleResponse ->getBody (), $ response ->getBody ());
@@ -121,15 +121,15 @@ public function executeGet()
121121 public function executePostWithFile ()
122122 {
123123 $ guzzleResponse = $ this ->getValidResponse ();
124- $ mockHandler = new MockHandler ([ $ guzzleResponse] );
124+ $ mockHandler = new MockHandler (array ( $ guzzleResponse) );
125125
126- $ container = [] ;
126+ $ container = array () ;
127127 $ history = Middleware::history ($ container );
128128
129129 $ stack = HandlerStack::create ($ mockHandler );
130130 $ stack ->push ($ history );
131131
132- $ adapter = new GuzzleAdapter ([ 'handler ' => $ stack] );
132+ $ adapter = new GuzzleAdapter (array ( 'handler ' => $ stack) );
133133
134134 $ request = new Request ();
135135 $ request ->setMethod (Request::METHOD_POST );
@@ -143,11 +143,11 @@ public function executePostWithFile()
143143 $ this ->assertSame ('OK ' , $ response ->getStatusMessage ());
144144 $ this ->assertSame ('200 ' , $ response ->getStatusCode ());
145145 $ this ->assertSame (
146- [
146+ array (
147147 'HTTP/1.1 200 OK ' ,
148148 'Content-Type: application/json ' ,
149149 'X-PHPUnit: response value ' ,
150- ] ,
150+ ) ,
151151 $ response ->getHeaders ()
152152 );
153153 $ this ->assertSame ((string )$ guzzleResponse ->getBody (), $ response ->getBody ());
@@ -169,15 +169,15 @@ public function executePostWithFile()
169169 public function executePostWithRawBody ()
170170 {
171171 $ guzzleResponse = $ this ->getValidResponse ();
172- $ mockHandler = new MockHandler ([ $ guzzleResponse] );
172+ $ mockHandler = new MockHandler (array ( $ guzzleResponse) );
173173
174- $ container = [] ;
174+ $ container = array () ;
175175 $ history = Middleware::history ($ container );
176176
177177 $ stack = HandlerStack::create ($ mockHandler );
178178 $ stack ->push ($ history );
179179
180- $ adapter = new GuzzleAdapter ([ 'handler ' => $ stack] );
180+ $ adapter = new GuzzleAdapter (array ( 'handler ' => $ stack) );
181181
182182 $ request = new Request ();
183183 $ request ->setMethod (Request::METHOD_POST );
@@ -192,11 +192,11 @@ public function executePostWithRawBody()
192192 $ this ->assertSame ('OK ' , $ response ->getStatusMessage ());
193193 $ this ->assertSame ('200 ' , $ response ->getStatusCode ());
194194 $ this ->assertSame (
195- [
195+ array (
196196 'HTTP/1.1 200 OK ' ,
197197 'Content-Type: application/json ' ,
198198 'X-PHPUnit: response value ' ,
199- ] ,
199+ ) ,
200200 $ response ->getHeaders ()
201201 );
202202 $ this ->assertSame ((string )$ guzzleResponse ->getBody (), $ response ->getBody ());
@@ -219,15 +219,15 @@ public function executePostWithRawBody()
219219 public function executeGetWithAuthentication ()
220220 {
221221 $ guzzleResponse = $ this ->getValidResponse ();
222- $ mockHandler = new MockHandler ([ $ guzzleResponse] );
222+ $ mockHandler = new MockHandler (array ( $ guzzleResponse) );
223223
224- $ container = [] ;
224+ $ container = array () ;
225225 $ history = Middleware::history ($ container );
226226
227227 $ stack = HandlerStack::create ($ mockHandler );
228228 $ stack ->push ($ history );
229229
230- $ adapter = new GuzzleAdapter ([ 'handler ' => $ stack] );
230+ $ adapter = new GuzzleAdapter (array ( 'handler ' => $ stack) );
231231
232232 $ request = new Request ();
233233 $ request ->setMethod (Request::METHOD_GET );
@@ -241,11 +241,11 @@ public function executeGetWithAuthentication()
241241 $ this ->assertSame ('OK ' , $ response ->getStatusMessage ());
242242 $ this ->assertSame ('200 ' , $ response ->getStatusCode ());
243243 $ this ->assertSame (
244- [
244+ array (
245245 'HTTP/1.1 200 OK ' ,
246246 'Content-Type: application/json ' ,
247247 'X-PHPUnit: response value ' ,
248- ] ,
248+ ) ,
249249 $ response ->getHeaders ()
250250 );
251251 $ this ->assertSame ((string )$ guzzleResponse ->getBody (), $ response ->getBody ());
@@ -277,9 +277,9 @@ public function executeRequestException()
277277 $ request ->setMethod (Request::METHOD_GET );
278278
279279 $ endpoint = new Endpoint (
280- [
280+ array (
281281 'scheme ' => 'silly ' , //invalid protocol
282- ]
282+ )
283283 );
284284 $ endpoint ->setTimeout (10 );
285285
@@ -294,26 +294,26 @@ public function executeRequestException()
294294 private function getValidResponse ()
295295 {
296296 $ body = json_encode (
297- [
298- 'response ' => [
297+ array (
298+ 'response ' => array (
299299 'numFound ' => 10 ,
300300 'start ' => 0 ,
301- 'docs ' => [
302- [
301+ 'docs ' => array (
302+ array (
303303 'id ' => '58339e95d5200 ' ,
304304 'author ' => 'Gambardella, Matthew ' ,
305305 'title ' => "XML Developer's Guide " ,
306306 'genre ' => 'Computer ' ,
307307 'price ' => 44.95 ,
308308 'published ' => 970372800 ,
309309 'description ' => 'An in-depth look at creating applications with XML. ' ,
310- ] ,
311- ] ,
312- ] ,
313- ]
310+ ) ,
311+ ) ,
312+ ) ,
313+ )
314314 );
315315
316- $ headers = [ 'Content-Type ' => 'application/json ' , 'X-PHPUnit ' => 'response value ' ] ;
316+ $ headers = array ( 'Content-Type ' => 'application/json ' , 'X-PHPUnit ' => 'response value ' ) ;
317317 return new Response (200 , $ headers , $ body );
318318 }
319319}
0 commit comments