@@ -75,26 +75,24 @@ public function testGetRequest()
7575 public function testHeadRequest ()
7676 {
7777 $ client = $ this ->getHttpClient (__FUNCTION__ );
78- $ response = $ client ->request ('HEAD ' , 'http://localhost:8057 ' , [
78+ $ response = $ client ->request ('HEAD ' , 'http://localhost:8057/head ' , [
7979 'headers ' => ['Foo ' => 'baR ' ],
8080 'user_data ' => $ data = new \stdClass (),
81+ 'buffer ' => false ,
8182 ]);
8283
8384 $ this ->assertSame ([], $ response ->getInfo ('response_headers ' ));
84- $ this ->assertSame ($ data , $ response ->getInfo ()['user_data ' ]);
8585 $ this ->assertSame (200 , $ response ->getStatusCode ());
8686
8787 $ info = $ response ->getInfo ();
88- $ this ->assertNull ($ info ['error ' ]);
89- $ this ->assertSame (0 , $ info ['redirect_count ' ]);
9088 $ this ->assertSame ('HTTP/1.1 200 OK ' , $ info ['response_headers ' ][0 ]);
9189 $ this ->assertSame ('Host: localhost:8057 ' , $ info ['response_headers ' ][1 ]);
92- $ this ->assertSame ('http://localhost:8057/ ' , $ info ['url ' ]);
9390
9491 $ headers = $ response ->getHeaders ();
9592
9693 $ this ->assertSame ('localhost:8057 ' , $ headers ['host ' ][0 ]);
9794 $ this ->assertSame (['application/json ' ], $ headers ['content-type ' ]);
95+ $ this ->assertTrue (0 < $ headers ['content-length ' ][0 ]);
9896
9997 $ this ->assertSame ('' , $ response ->getContent ());
10098 }
@@ -265,6 +263,7 @@ public function test304()
265263 $ client = $ this ->getHttpClient (__FUNCTION__ );
266264 $ response = $ client ->request ('GET ' , 'http://localhost:8057/304 ' , [
267265 'headers ' => ['If-Match ' => '"abc" ' ],
266+ 'buffer ' => false ,
268267 ]);
269268
270269 $ this ->assertSame (304 , $ response ->getStatusCode ());
0 commit comments