qa:temp:ext:curl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
qa:temp:ext:curl [2009/05/09 11:52] mattijsqa:temp:ext:curl [2011/04/06 10:59] – external edit 127.0.0.1
Line 8: Line 8:
 Where http://www.example.com is the url to the host providing the test file. If the variable is not set the tests will assume you have webserver unning on the machine the tests are run on. Where http://www.example.com is the url to the host providing the test file. If the variable is not set the tests will assume you have webserver unning on the machine the tests are run on.
  
-The file that is requisted can be found in the ''ext/curl/tests/responder'' directory and needs to be copied to the root of the webserver.+The file used for testing can be found in the ''ext/curl/tests/responder'' directory and needs to be copied to the root of the webserver that is going to be used for testing.
  
 ===== With a local file ===== ===== With a local file =====
-Proposal for file fallback.+Some cURL tests work with a local file. The ''PHP_CURL_HTTP_REMOTE_SERVER'' variable can be set to a local file to get the reponse data from. 
 + 
 +The following piece of code is used to make sure a file is always present.
 <code> <code>
 // Figure out what handler to use // Figure out what handler to use
Line 25: Line 27:
     file_put_contents($tempname, "Hello World!\nHello World!");     file_put_contents($tempname, "Hello World!\nHello World!");
 } }
 +
 +/* .. your test .. */
 +
 +// Cleanup
 +isset( $tempname ) and unlink( $tempname );
 </code> </code>
 +
 +When the ''PHP_CURL_HTTP_REMOTE_SERVER'' variable isn't set a temporary file is created and the data needed for the test is put in there.
qa/temp/ext/curl.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1