We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70ef132 + 145e7b7 commit 7eb413bCopy full SHA for 7eb413b
tests/PHPCurlClass/PHPCurlClassTest.php
@@ -321,6 +321,26 @@ public function testPostAssociativeArrayData()
321
);
322
}
323
324
+ public function testPostContentLength()
325
+ {
326
+ $test_data = array(
327
+ array(false, 0),
328
+ array('', 0),
329
+ array(array(), 0),
330
+ array(null, 0),
331
+ );
332
+ foreach ($test_data as $data) {
333
+ $test = new Test();
334
+ list($post_data, $expected_content_length) = $data;
335
+ if ($post_data === false) {
336
+ $test->server('post', 'POST');
337
+ } else {
338
+ $test->server('post', 'POST', $post_data);
339
+ }
340
+ $this->assertEquals($expected_content_length, $test->curl->requestHeaders['Content-Length']);
341
342
343
+
344
public function testPostMultidimensionalData()
345
{
346
$test = new Test();
0 commit comments