mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 04:34:27 +00:00
Add test for parsing empty response (#96)
This commit is contained in:
@@ -716,6 +716,18 @@ class CurlTest extends PHPUnit_Framework_TestCase
|
||||
xmlAssertion('CONTENT-TYPE', 'text/xml;charset=utf-8');
|
||||
}
|
||||
|
||||
public function testEmptyResponse()
|
||||
{
|
||||
$response = "\r\n\r\n";
|
||||
|
||||
$reflector = new ReflectionClass('\Curl\Curl');
|
||||
$reflection_method = $reflector->getMethod('parseResponse');
|
||||
$reflection_method->setAccessible(true);
|
||||
|
||||
$curl = new Curl();
|
||||
$reflection_method->invoke($curl, $response);
|
||||
}
|
||||
|
||||
public function testArrayToStringConversion()
|
||||
{
|
||||
$test = new Test();
|
||||
|
||||
Reference in New Issue
Block a user