169 Commits

Author SHA1 Message Date
Zach Borboa 26e6a966df Add allowed error that occurs when running unit tests inside container 2018-07-28 13:40:33 -07:00
Zach Borboa 24e98595f0 Throw error when json_encode fails 2018-07-27 01:43:17 -07:00
Zach Borboa 86e12e3b91 Fix #331: Add methods to use proxy 2018-07-17 04:29:25 -07:00
Zach Borboa c21970ff9a Fix #303: Add methods for mocking.
Thanks to Sven Lütje (B4rb4ross4) for the initial suggestion and pull
request.
2018-07-07 04:16:34 -07:00
Zach Borboa bc1dd97917 Simplify test 2018-06-18 23:50:28 -07:00
Zach Borboa 463b2adc71 Reorder tests 2018-06-18 23:12:57 -07:00
Zach Borboa 2bb151e03d Allow specifying xml decoder options when calling Curl::setDefaultXmlDecoder 2018-06-18 23:08:26 -07:00
Zach Borboa e087a5c117 Clean up 2018-06-18 01:29:16 -07:00
Zach Borboa 51904c06e3 Simplify test for Curl::reset() 2018-06-04 23:03:32 -07:00
Reza Sanaie 9f34c2bf57 Allow support for curl_reset() 2018-06-04 10:21:22 -07:00
Zach Borboa 60917c1e8e Use unset() to automatically call __destruct() when testing for a memory leak 2018-05-23 00:57:10 -07:00
Zach Borboa fddd222575 Add additional possible error 2018-05-20 02:47:13 -07:00
Zach Borboa d736b5652b Add assertion messages to display unexpected error codes 2018-05-20 02:46:43 -07:00
Zach Borboa 90f4552563 Fix failure tests erroring during continuous integration tests with mismatching error codes.
Fixes "Failed asserting that 28 matches expected 55."
2018-04-29 02:25:01 -07:00
Zach Borboa 027ee67373 Fix failure tests erroring with mismatching error codes.
Fixes "Failed asserting that 35 matches expected 28."
2018-04-29 01:47:55 -07:00
Zach Borboa fa39f26a3a Fix #517: Require mbstring extension.
Use global namespace for mb_* functions.
2018-04-28 16:21:15 -07:00
woxcab c91d7a7d78 Erase base URL parts if their preceding parts have overwritten by relative URL 2018-04-27 23:27:35 +03:00
Zach Borboa a969fabaa0 Fix #513: Add support for detecting SOAP content-types 2018-04-26 17:59:23 -07:00
Zach Borboa e240b43606 Fix #511: Use correct body in POST requests that use empty data arrays.
This fixes JSON POST requests incorrectly sending a serialized empty
array "[]" instead of an empty request body by default.
2018-04-26 02:49:21 -07:00
Zach Borboa 1d8c3f06da Skip post-redirect-get test on hhvm-nightly 2018-01-27 06:28:51 -08:00
Zach Borboa cbacd9a68b Fix #490: Allow malformed response header to be parsed without error 2018-01-09 01:58:51 -08:00
Zach Borboa 05a5af9b8e Fix #472: Reset request content-length to fix subsequent request hanging after a PUT request 2017-10-11 00:01:20 -07:00
Zach Borboa ce9ff3c7ec Fix #347: Add basic support for requests using relative paths 2017-10-09 19:30:36 -07:00
Zach Borboa 4ec89be9bc Allow setRetry() methods to use callables 2017-09-02 02:23:40 -07:00
Zach Borboa 0f1e16a6fa Implement MultiCurl::setRetry() 2017-08-31 01:26:42 -07:00
Zach Borboa 3c3741f891 Implement Curl::setRetry() 2017-08-30 01:36:13 -07:00
Dane Westvik cd08b5dee7 Support for urls with query parameters 2017-08-24 13:36:23 -07:00
Zach Borboa 95041d6c49 Run Digest Access Authentication test on HHVM 2017-07-03 01:59:27 -07:00
Zach Borboa 3b672a2131 Put expected arguments first 2017-05-02 23:31:43 -07:00
Zach Borboa eeaf3f9534 Clean up PSR-2 coding styles 2017-05-02 07:56:45 -07:00
Zach Borboa a0802b309d Clean up 2017-05-01 02:02:40 -07:00
Zach Borboa 316e18d52f Fix exception namespace 2017-05-01 00:44:11 -07:00
Zach Borboa 2264362338 Clean up namespacing 2017-04-30 15:58:33 -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 658a10f013 Fix #441: Allow using string as well as array for query parameter argument 2017-04-25 23:53:33 -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 b6e6524d29 Move array methods to separate file 2016-12-24 13:04:12 -08:00
Zach Borboa abc7dc2f53 Use Curl::getOpt() instead of reflection 2016-12-24 12:47:58 -08:00
Zach Borboa 96b3d50c2e Simplify setCookie tests 2016-12-24 12:16:10 -08:00
Zach Borboa 296345b0a2 Implement Curl::setCookies() 2016-12-18 11:31:38 -08:00
Zach Borboa 7a623ac0de Add newline to allow cookie file to be read correctly and cookies to be included in request 2016-12-15 03:29:33 -08:00
Zach Borboa 04b8a63e71 Use Curl::setCookieFile() 2016-12-15 03:17:31 -08:00
Zach Borboa 4b8f6e0082 Readd assertion testing cookie sent in request and received by server 2016-12-15 03:17:04 -08:00
Zach Borboa 6e7c609ca8 Fix test failing only on continuous integration servers 2016-12-10 14:21:13 -08:00
Zach Borboa 95c9f92c9f Clean up 2016-11-12 09:21:06 -08:00
Zach Borboa 714d072a14 Mark skipped tests with PHPUnit markTestSkipped() 2016-11-12 08:41:23 -08:00
Zach Borboa 6b63561944 Add additional download tests with partial file having same or larger file size as source 2016-11-11 00:38:30 -08:00
Zach Borboa 5cb05e956a Fix #405: Support resume for Curl::download() 2016-11-10 20:34:18 -08:00