Commit Graph

297 Commits

Author SHA1 Message Date
Zach Borboa eadd466f66 Fix parsing schemeless url 2021-08-07 17:48:47 -04:00
Zach Borboa 25e9126f77 Make Url::parseUrl() and Url::percentEncodeChars() static functions. 2021-08-06 21:01:02 -04:00
Zach Borboa 620bf40691 Move ArrayUtil tests under ArrayUtilTest 2021-07-26 21:48:17 -04:00
Zach Borboa c51b175748 Increase amount of time drift allowed
(noisy neighbors?)
2021-07-26 20:44:33 -04:00
Zach Borboa cd825550b2 Fix Curl::downloadFileName not being correctly set 2021-07-26 20:17:14 -04:00
Zach Borboa 285b4f02e6 Update tests to more closely match one another 2021-07-26 10:29:24 -04:00
Zach Borboa 7af4a8d383 Fix some errors caused by using strict types 2021-07-26 10:08:44 -04:00
Zach Borboa bb1a190071 Use strict types 2021-07-26 00:48:18 -04:00
Zach Borboa 6ceabf7293 Clean up 2021-07-26 00:35:01 -04:00
Zach Borboa 1226bb1a6c Implement option to capture output of Curl::diagnose() 2021-07-20 23:28:20 -04:00
Zach Borboa 7348de72f3 Clean up 2021-07-20 23:10:20 -04:00
Zach Borboa 18e76855c2 Fix assertion 2021-07-20 23:01:40 -04:00
Zach Borboa 2a899465c4 Add method to run basic request diagnostics 2021-07-18 21:56:03 -04:00
Zach Borboa 250421927f Add additional Curl::set* and MultiCurl::set* helper methods 2021-06-17 11:14:29 -04:00
Zach Borboa fe829855cb Fix #670: Add additional checks before attempting to close curl handles 2021-06-09 20:58:33 -04:00
Zach Borboa 0031da7477 Remove environmental variable no longer needed
All the tests now make use of PHP's built-in web server and the variable
is no longer needed to determine if the development server is being
used.
2021-03-26 00:03:46 -04:00
Zach Borboa 06ca377f64 Add support for using relative urls with MultiCurl::add*() methods
This change allows setting a base url with MultiCurl and adding requests
using relative paths.

Fixes #628.
2021-03-23 11:03:39 -04:00
Zach Borboa b88fd76ffc Move Curl::buildUrl() to Url::buildUrl() 2021-03-23 10:02:11 -04:00
Zach Borboa 57bfcb4e1a Clean up 2021-03-22 22:55:46 -04:00
Zach Borboa 161f9aea63 Use short array syntax 2021-03-18 01:15:52 -04:00
Zach Borboa cc3f7bac24 Remove PHP v5.x support and add basic doc for how one may install the old version 2021-03-17 12:19:38 -04:00
Zach Borboa 05a1a21090 Remove official support of HHVM
As of HHVM 4.0, PHP is no longer supported:
    "With this release, we no longer aim to be compatible with PHP"
    "We are considering removing support for <?php in the next release [...]"
2021-03-17 09:33:50 -04:00
Zach Borboa d946b02b89 Clean up references of the previous continuous integration 2021-03-17 01:07:48 -04:00
Zach Borboa 6645958447 Remove fix attempt for CurlTest::testTimeout() 2021-03-17 00:40:36 -04:00
Zach Borboa e71ff2c56c Use MultiCurl::startTime and MultiCurl::stopTime when generating request stats 2021-03-17 00:29:47 -04:00
Zach Borboa 6c355bdb5e Update step names 2021-03-16 22:27:05 -04:00
Zach Borboa 7697d2be2b Use message from test helper when assertion fails 2021-03-16 21:57:12 -04:00
Zach Borboa a74b38821c Set debugging message when rate limit assertions fail 2021-03-16 12:34:40 -04:00
Zach Borboa 1d35adf53d Attempt to fix the timeout tests failing
Use different ports for the timeout tests as the development server can
only handle one request at a time (single-threaded).
2021-03-16 09:18:28 -04:00
Zach Borboa 6d04c33645 Attempt to fix timeout issue only occurring on ci 2021-03-15 22:35:18 -04:00
Zach Borboa f979b5ee87 Fix variable 2021-03-15 21:23:33 -04:00
Zach Borboa c1eff76154 Add additional debugging 2021-03-15 20:57:07 -04:00
Zach Borboa a143250a68 Add debugging error message 2021-03-15 20:25:07 -04:00
Zach Borboa 6531a8443b Fix multipart/form-data tests expecting an Expect header 2021-03-15 07:01:22 -04:00
Zach Borboa dd15d946c0 Skip test on PHP 8.0 and later due to error 2021-03-14 00:25:17 -05:00
Zach Borboa cd42a47bd8 Make request duration more accurate 2021-03-13 23:30:24 -05:00
Zach Borboa 79e7ddafb5 Fix tests as curl_init() and curl_multi_init() can return an object
As of PHP 8.0.0, curl_init() and curl_multi_init() return an object
instead of a resource. Update the tests to pass when the curl init
functions return either an object or a resource.
2021-03-13 20:32:20 -05:00
Zach Borboa 75adc83a5c Add tests that expose the empty cookie jar after close bug 2021-03-13 18:18:15 -05:00
Zach Borboa b27d86cd13 Add files to run php80 tests inside a docker container 2021-03-13 18:03:24 -05:00
Zach Borboa 3406c09653 Remove unnecessary flush
Message:
    Notice: ob_flush(): Failed to flush buffer. No buffer to flush in
    ./php-curl-class/tests/PHPCurlClass/server.php on line 288
2021-03-13 17:32:53 -05:00
Zach Borboa 23e95578f8 Use helper function to simplify calculating request statistics 2021-03-13 17:30:13 -05:00
Zach Borboa dbef40b16d Clean up 2021-03-12 21:54:05 -05:00
Zach Borboa 9d4134b830 Use a helper function to access values of private class properties 2020-10-31 21:28:15 -07:00
Zach Borboa 3d8e4c38c2 Allow passing an indexed array to MultiCurl::setHeaders() 2020-10-31 14:59:35 -07:00
Zach Borboa bebefa431c Consider CaseInsensitiveArray an associative array. 2020-10-31 12:32:19 -07:00
Zach Borboa 37c605f9e4 Fix #651: Allow passing an indexed array to Curl::setHeaders() 2020-10-30 21:52:43 -07:00
Zach Borboa 85c95b187c Add rate limit test cases using uppercase letters for unit 2020-05-16 23:53:29 -07:00
Zach Borboa b33bfb93ef Clean up 2020-05-16 23:51:23 -07:00
Zach Borboa 976008d094 Implement rate limiting requests via MultiCurl::setRateLimit() 2020-05-16 22:01:15 -07:00
Zach Borboa 9c00119ab5 Improve accuracy of timeout call by using microtime() 2020-05-12 22:41:02 -07:00