diff --git a/.travis.yml b/.travis.yml index 28b51cb..a4a6196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ php: matrix: allow_failures: + - php: 5.3 - php: 5.6 - php: hhvm diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 27e947e..aa20126 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -204,7 +204,7 @@ class Curl public function setCookie($key, $value) { $this->cookies[$key] = $value; - $this->setOpt(CURLOPT_COOKIE, http_build_query($this->cookies, '', '; ', PHP_QUERY_RFC3986)); + $this->setOpt(CURLOPT_COOKIE, str_replace('+', '%20', http_build_query($this->cookies, '', '; '))); } public function setCookieFile($cookie_file) diff --git a/tests/PHPCurlClass/PHPCurlClassTest.php b/tests/PHPCurlClass/PHPCurlClassTest.php index b8971a4..1d800f7 100644 --- a/tests/PHPCurlClass/PHPCurlClassTest.php +++ b/tests/PHPCurlClass/PHPCurlClassTest.php @@ -8,9 +8,10 @@ use \Helper\Test; class CurlTest extends PHPUnit_Framework_TestCase { - public function testExtensionLoaded() + public function testExtensionsLoaded() { $this->assertTrue(extension_loaded('curl')); + $this->assertTrue(extension_loaded('gd')); } public function testArrayAssociative() diff --git a/tests/before_script.sh b/tests/before_script.sh index 9dae6d3..ac23bba 100644 --- a/tests/before_script.sh +++ b/tests/before_script.sh @@ -1,4 +1,28 @@ -if [[ "${TRAVIS_PHP_VERSION}" == "5.4" ]]; then +if [[ "${TRAVIS_PHP_VERSION}" == "5.3" ]]; then + sudo add-apt-repository -y ppa:nginx/stable + sudo apt-get update + sudo apt-get install -y nginx + sudo apt-get install -y php5-fpm + root="$(pwd)/tests/PHPCurlClass" + sudo tee /etc/nginx/sites-enabled/default <