diff --git a/tests/ZendTest/Http/Client/StaticTest.php b/tests/ZendTest/Http/Client/StaticTest.php index 86b9bcf368f..69e2c2e7a77 100644 --- a/tests/ZendTest/Http/Client/StaticTest.php +++ b/tests/ZendTest/Http/Client/StaticTest.php @@ -322,7 +322,7 @@ public function testGetLastRawResponseWhenNotStoring() */ public function testInvalidPostContentType() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->setExpectedException( @@ -342,7 +342,7 @@ public function testInvalidPostContentType() */ public function testSocketErrorException() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->setExpectedException( @@ -381,7 +381,7 @@ public function testSettingInvalidMethodThrowsException($method) */ public function testFormDataEncodingWithMultiArrayZF7038() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->_client->setAdapter('Zend\Http\Client\Adapter\Test'); @@ -427,7 +427,7 @@ public function testFormDataEncodingWithMultiArrayZF7038() */ public function testMultibyteRawPostDataZF2098() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->_client->setAdapter('Zend\Http\Client\Adapter\Test'); @@ -455,7 +455,7 @@ public function testMultibyteRawPostDataZF2098() */ public function testOpenTempStreamWithValidFileDoesntThrowsException() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $url = 'http://www.example.com/'; @@ -478,7 +478,7 @@ public function testOpenTempStreamWithValidFileDoesntThrowsException() */ public function testOpenTempStreamWithBogusFileClosesTheConnection() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->setExpectedException( @@ -501,7 +501,7 @@ public function testOpenTempStreamWithBogusFileClosesTheConnection() */ public function testEncodedCookiesInRequestHeaders() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->_client->addCookie('foo', 'bar=baz'); @@ -518,7 +518,7 @@ public function testEncodedCookiesInRequestHeaders() */ public function testRawCookiesInRequestHeaders() { - if (!constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { + if (!defined('TESTS_ZEND_HTTP_CLIENT_ONLINE') || !constant('TESTS_ZEND_HTTP_CLIENT_ONLINE')) { $this->markTestSkipped('Zend\Http\Client online tests are not enabled'); } $this->_client->setOptions(array('encodecookies' => false));