mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 20:20:53 +00:00
Add DELETE test
This commit is contained in:
@@ -58,6 +58,9 @@ class CurlTest extends PHPUnit_Framework_TestCase {
|
||||
public function testDelete() {
|
||||
$test = new Test();
|
||||
$this->assertTrue($test->server('DELETE', 'server', 'REQUEST_METHOD') === 'DELETE');
|
||||
|
||||
$test = new Test();
|
||||
$this->assertTrue($test->server('DELETE', 'delete', 'test') === 'delete');
|
||||
}
|
||||
|
||||
public function testBasicHttpAuth() {
|
||||
|
||||
@@ -25,6 +25,9 @@ header('Content-Type: text/plain');
|
||||
if ($test === 'put') {
|
||||
$value = isset($_GET[$key]) ? $_GET[$key] : '';
|
||||
}
|
||||
else if ($test === 'delete') {
|
||||
$value = isset($_GET[$key]) ? $_GET[$key] : '';
|
||||
}
|
||||
else if ($test === 'post') {
|
||||
$value = isset($_POST[$key]) ? $_POST[$key] : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user