]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.5' into PHP-5.6
authorStanislav Malyshev <stas@php.net>
Mon, 12 May 2014 05:44:30 +0000 (22:44 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 12 May 2014 06:03:21 +0000 (23:03 -0700)
* PHP-5.5:
  improve CURL tests to allow testing without separate server

1  2 
ext/curl/tests/curl_file_upload.phpt

index d3168e578ac981854ddfa84874a1d0b2e1df13f7,b06dedb688a08d9653517dde947ad185124728b2..3a5a78fde36ca990e1eb98d0e65207c536492ed6
@@@ -1,14 -1,7 +1,8 @@@
  --TEST--
  CURL file uploading
++--INI--
  --SKIPIF--
- <?php
- if (!extension_loaded("curl")) {
-       exit("skip curl extension not loaded");
- }
- if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER'))  {
-       exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
- }
- ?>
+ <?php include 'skipif.inc'; ?>
  --FILE--
  <?php
  
@@@ -48,6 -42,6 +43,7 @@@ var_dump($file->getPostFilename())
  curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file));
  var_dump(curl_exec($ch));
  
++curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);
  $params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt');
  curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
  var_dump(curl_exec($ch));