mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Add unit test for normal getUrl cases
This commit is contained in:
@@ -91,6 +91,18 @@ class CurlTest extends PHPUnit_Framework_TestCase
|
||||
'key' => 'REQUEST_METHOD',
|
||||
)));
|
||||
}
|
||||
|
||||
public function testGetUrl()
|
||||
{
|
||||
$test = new Test();
|
||||
$verbs = array('GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS');
|
||||
|
||||
foreach ($verbs as $verb) {
|
||||
$test->server('server', $verb);
|
||||
$this->assertEquals(Test::TEST_URL, $test->curl->getUrl());
|
||||
$test->curl->setUrl(''); // reset url in case of the verb method doesn't set url
|
||||
}
|
||||
}
|
||||
|
||||
public function testPostRequestMethod()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user