We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86f0070 commit 35f0631Copy full SHA for 35f0631
1 file changed
test.php
@@ -170,6 +170,19 @@ public function test_multistatus_response(){
170
], $api->headers);
171
$this->assertEquals("body", $api->response);
172
}
173
+
174
+ public function test_status_only_response(){
175
+ $RESPONSE = "HTTP/1.1 100 Continue\r\n\r\n";
176
177
+ $api = new RestClient;
178
+ // bypass request execution to inject controlled response data.
179
+ $api->parse_response($RESPONSE);
180
181
+ $this->assertEquals(["HTTP/1.1 100 Continue"],
182
+ $api->response_status_lines);
183
+ $this->assertEquals((object) [], $api->headers);
184
+ $this->assertEquals("", $api->response);
185
+ }
186
187
188
0 commit comments