Add DELETE test

This commit is contained in:
php-curl-class
2013-08-20 17:11:16 -07:00
parent c63bee9447
commit 7ab095ebae
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -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() {
+3
View File
@@ -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] : '';
}