Commit Graph

44 Commits

Author SHA1 Message Date
Zach Borboa 8a374aa191 Update tests to run assertions before instances are cleaned up and properties are null. 2017-04-30 03:52:59 -07:00
Zach Borboa fb1f36da16 Fix syntax error for PHP 5.3 and PHP 5.4.
Fixes "PHP Parse error:  syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in XXX on line XXX".
2017-04-29 03:29:24 -07:00
Zach Borboa efbcc080bb Allow the disabling of automatic response decoding.
The following will disable their respective decoders:

  $curl->setDefaultDecoder(false);
  $curl->setJsonDecoder(false);
  $curl->setXmlDecoder(false);
2017-04-29 02:54:35 -07:00
Zach Borboa 0996917ae0 Add assertions to fix "risky tests" warning 2017-03-20 01:42:15 -07:00
Zach Borboa d9b5e3ebd5 Fix PHPUnit 6.0 release causing build to break.
Use PHPUnit's new namespacing.
Add shim for backwards compatibility and run on PHP < 7.0.
2017-03-18 04:25:48 -07:00
Zach Borboa 7dc6eba0af Process multicurl requests in ascending numerical order.
Previously, multicurl requests were added to the end and removed from the end. Requests are now added to the end and
removed from the beginning. Using array_shift() will be slower than array_pop().

Before using "array_push()" + array_pop():
  1
  1 2
  1 2 3
  1 2 3 4
  1 2 3
  1 2
  1

After using "array_push()" + array_shift():
  1
  1 2
  1 2 3
  1 2 3 4
  2 3 4
  3 4
  4
2016-12-25 01:45:16 -05:00
Zach Borboa 7b5dd71bd5 Implement MultiCurl::setCookies() 2016-12-23 00:20:51 -08:00
Zach Borboa 714d072a14 Mark skipped tests with PHPUnit markTestSkipped() 2016-11-12 08:41:23 -08:00
Zach Borboa 5cb8223c47 Fix #400: Use sequential ids to allow for ordered post processing 2016-10-14 19:50:57 -07:00
Kai Hempel e087f51c61 Add a curl add method for direct handle attach 2016-10-11 17:13:32 +02:00
Zach Borboa cc23a1b29e Fix Curl::unsetHeader() 2016-09-24 01:02:04 -07:00
Zach Borboa 7ca7ac3629 Use request-line header and effectiveUrl for assertions 2016-09-04 03:03:24 -07:00
Zach Borboa 35ac500e03 Improve cookie handling for multicurl requests.
Fix Curl::responseCookies set in headerCallback() being overwritten during multicurl request.
Use rfc cookie encoding when using MultiCurl::setCookie().
Make MultiCurl::responseCookies publicly accessible.
2016-09-04 01:12:06 -07:00
Zach Borboa 4c47bac9fa Add multicurl test for setHeader and individual overrides 2016-09-04 00:13:49 -07:00
Zach Borboa 39c21041a5 Clean up per PSR2 2016-08-24 00:25:38 -07:00
Zach Borboa 25d9304672 Add output parameter to MultiCurl::verbose 2016-07-04 11:34:52 -07:00
Cyrille Faucheux dc6001688f Support post-redirect-get requests 2016-03-05 13:45:25 +01:00
Zach Borboa ebca4c2c19 Add MultiCurl::setXmlDecoder 2016-01-31 10:53:32 -08:00
Zach Borboa ebf406c14a Fix #170: Allow setting MultiCurl callbacks after requests are added 2016-01-23 12:08:33 -08:00
Zach Borboa d69cded020 Fix #254: CaseInsensitiveArray not found. 2015-10-20 21:54:53 -07:00
Zach Borboa e70228cff9 Fix #248: Close MultiCurl resource only when still open 2015-09-18 01:14:51 -07:00
Zach Borboa bcad567db9 Fix long lines 2015-08-20 02:37:51 -07:00
Zach Borboa e46dc8146e Fix continuous integration tests for HHVM 2015-08-19 18:07:04 -07:00
Zach Borboa 2df98d1708 Add test for adding Multicurl handles after calling start() 2015-08-19 08:47:50 -07:00
Zach Borboa d7861d8e08 Update HTTP digest authentication tests for MultiCurl 2015-08-11 20:34:27 -07:00
Vladimir Chernyshev e3b09c6654 Update PHPMultiCurlClassTest.php
Add testDigestHttpAuthSuccess
2015-08-11 13:24:09 +03:00
Zach Borboa 8d701b0648 Fix #191: Use $camelCase for properties (class member variables) 2015-07-30 23:54:03 -07:00
Zach Borboa 7256a716a1 Fix missing body in DELETE tests 2015-04-23 15:44:15 -07:00
Zach Borboa 70be5e4eb3 Fix #171: Allow sending body data in delete() 2015-04-22 01:18:48 -07:00
Zach Borboa 2028a86dd4 Add tests for MultiCurl::setUrl() 2015-03-04 01:23:23 +07:00
Zach Borboa 20ee312a10 Add ability to specify a callback for MultiCurl::download() 2015-02-25 01:24:38 +07:00
Zach Borboa 7f2a97f57b Implement additional MultiCurl functions available in Curl.
MultiCurl::setBasicAuthentication(), MultiCurl::setCookie(),
MultiCurl::setCookieFile(), MultiCurl::setCookieJar(),
MultiCurl::setJsonDecoder(), MultiCurl::setReferer(), MultiCurl::setReferrer(),
MultiCurl::setTimeout(), MultiCurl::setUserAgent(), MultiCurl::unsetHeader(),
MultiCurl::verbose()
2015-02-16 15:55:57 +07:00
Zach Borboa 124d60314c Implement MultiCurl::addDownload(); Add Curl::download() and MultiCurl::download() examples 2015-02-15 00:10:16 +07:00
Zach Borboa 6e9bdf9817 Implement MultiCurl::setHeader(), MultiCurl::setOpt(), MultiCurl::getOpt() 2015-02-11 07:41:21 +07:00
Zach Borboa a0da3731d4 Add callback override test 2015-02-11 06:56:42 +07:00
Zach Borboa eb9986a229 Add individual curl callback error tests 2015-02-11 06:36:16 +07:00
Zach Borboa 7bf9508828 Add individual curl callback tests 2015-02-11 06:19:27 +07:00
Zach Borboa fc8b6e1e31 Add callback tests for errors 2015-02-10 14:40:59 -08:00
Zach Borboa 1060fd30a5 Implement MultiCurl::addPut() 2015-02-10 14:08:18 -08:00
Zach Borboa 51420bb764 Implement MultiCurl::addPost() 2015-02-10 14:00:09 -08:00
Zach Borboa 5eb436cb26 Implement MultiCurl::addPatch() 2015-02-10 13:53:04 -08:00
Zach Borboa 6bd3626544 Implement MultiCurl::addOptions(); Fix issue caused by messages left in the queue (curl_multi_info_read) 2015-02-10 13:39:33 -08:00
Zach Borboa bad06c358b Implement and add tests for MultiCurl::addDelete() and MultiCurl::addHead() 2015-02-10 12:41:18 -08:00
Zach Borboa 9da8277926 Add example implementation of MultiCurl::addGet() with MultiCurlTest tests 2015-02-10 10:21:57 -08:00