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:
Zach Borboa
2017-04-29 03:29:24 -07:00
parent efbcc080bb
commit fb1f36da16
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -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();
+2 -2
View File
@@ -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);
});