mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-01 13:19:12 +00:00
Fix syntax error for PHP 5.3 and PHP 5.4.
Fixes "PHP Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in XXX on line XXX".
This commit is contained in:
@@ -2593,7 +2593,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
'value' => $value,
|
||||
));
|
||||
|
||||
$this->assertInstanceOf(SimpleXMLElement::class, $test->curl->response);
|
||||
$this->assertInstanceOf('SimpleXMLElement', $test->curl->response);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->formatOutput = true;
|
||||
@@ -2955,7 +2955,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
$test = new Test();
|
||||
$test->server('xml_with_cdata_response', 'POST');
|
||||
$this->assertTrue(is_object($test->curl->response));
|
||||
$this->assertInstanceOf(SimpleXMLElement::class, $test->curl->response);
|
||||
$this->assertInstanceOf('SimpleXMLElement', $test->curl->response);
|
||||
$this->assertFalse(strpos($test->curl->response->saveXML(), '<![CDATA[') === false);
|
||||
|
||||
$test = new Test();
|
||||
@@ -2964,7 +2964,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
});
|
||||
$test->server('xml_with_cdata_response', 'POST');
|
||||
$this->assertTrue(is_object($test->curl->response));
|
||||
$this->assertInstanceOf(SimpleXMLElement::class, $test->curl->response);
|
||||
$this->assertInstanceOf('SimpleXMLElement', $test->curl->response);
|
||||
$this->assertTrue(strpos($test->curl->response->saveXML(), '<![CDATA[') === false);
|
||||
|
||||
$test = new Test();
|
||||
@@ -2995,7 +2995,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
'key' => 'Content-Type',
|
||||
'value' => 'application/but-not-json',
|
||||
));
|
||||
$this->assertInstanceOf(stdClass::class, $test->curl->response);
|
||||
$this->assertInstanceOf('stdClass', $test->curl->response);
|
||||
|
||||
// "xml".
|
||||
$test = new Test();
|
||||
@@ -3004,7 +3004,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
'key' => 'Content-Type',
|
||||
'value' => 'text/but-not-xml',
|
||||
));
|
||||
$this->assertInstanceOf(SimpleXMLElement::class, $test->curl->response);
|
||||
$this->assertInstanceOf('SimpleXMLElement', $test->curl->response);
|
||||
|
||||
// False.
|
||||
$test = new Test();
|
||||
|
||||
@@ -2167,7 +2167,7 @@ class MultiCurlTest extends \PHPUnit\Framework\TestCase
|
||||
$post_1 = $multi_curl->addPost(Test::TEST_URL);
|
||||
$post_1->complete(function ($instance) {
|
||||
\PHPUnit\Framework\Assert::assertTrue(is_object($instance->response));
|
||||
\PHPUnit\Framework\Assert::assertInstanceOf(SimpleXMLElement::class, $instance->response);
|
||||
\PHPUnit\Framework\Assert::assertInstanceOf('SimpleXMLElement', $instance->response);
|
||||
\PHPUnit\Framework\Assert::assertFalse(strpos($instance->response->saveXML(), '<![CDATA[') === false);
|
||||
});
|
||||
|
||||
@@ -2177,7 +2177,7 @@ class MultiCurlTest extends \PHPUnit\Framework\TestCase
|
||||
});
|
||||
$post_2->complete(function ($instance) {
|
||||
\PHPUnit\Framework\Assert::assertTrue(is_object($instance->response));
|
||||
\PHPUnit\Framework\Assert::assertInstanceOf(SimpleXMLElement::class, $instance->response);
|
||||
\PHPUnit\Framework\Assert::assertInstanceOf('SimpleXMLElement', $instance->response);
|
||||
\PHPUnit\Framework\Assert::assertTrue(strpos($instance->response->saveXML(), '<![CDATA[') === false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user