@@ -342,6 +342,9 @@ public function testGetLastRawResponseWhenNotStoring()
342342 */
343343 public function testInvalidPostContentType ()
344344 {
345+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
346+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
347+ }
345348 $ this ->setExpectedException (
346349 'Zend\Http\Exception\RuntimeException ' ,
347350 'Cannot handle content type \'x-foo/something-fake \' automatically ' );
@@ -359,6 +362,9 @@ public function testInvalidPostContentType()
359362 */
360363 public function testSocketErrorException ()
361364 {
365+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
366+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
367+ }
362368 $ this ->setExpectedException (
363369 'Zend\Http\Client\Adapter\Exception\RuntimeException ' ,
364370 'Unable to Connect to tcp://255.255.255.255:80 ' );
@@ -395,6 +401,9 @@ public function testSettingInvalidMethodThrowsException($method)
395401 */
396402 public function testFormDataEncodingWithMultiArrayZF7038 ()
397403 {
404+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
405+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
406+ }
398407 $ this ->_client ->setAdapter ('Zend\Http\Client\Adapter\Test ' );
399408 $ this ->_client ->setUri ('http://example.com ' );
400409 $ this ->_client ->setEncType (HTTPClient::ENC_FORMDATA );
@@ -439,6 +448,9 @@ public function testFormDataEncodingWithMultiArrayZF7038()
439448 */
440449 public function testMultibyteRawPostDataZF2098 ()
441450 {
451+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
452+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
453+ }
442454 $ this ->_client ->setAdapter ('Zend\Http\Client\Adapter\Test ' );
443455 $ this ->_client ->setUri ('http://example.com ' );
444456
@@ -464,6 +476,9 @@ public function testMultibyteRawPostDataZF2098()
464476 */
465477 public function testOpenTempStreamWithValidFileDoesntThrowsException ()
466478 {
479+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
480+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
481+ }
467482 $ url = 'http://www.example.com/ ' ;
468483 $ config = array (
469484 'outputstream ' => realpath (__DIR__ . '/_files/zend_http_client_stream.file ' ),
@@ -486,6 +501,9 @@ public function testOpenTempStreamWithValidFileDoesntThrowsException()
486501 */
487502 public function testOpenTempStreamWithBogusFileClosesTheConnection ()
488503 {
504+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
505+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
506+ }
489507 $ this ->setExpectedException (
490508 'Zend\Http\Exception\RuntimeException ' ,
491509 'Could not open temp file /path/to/bogus/file.ext ' );
@@ -506,6 +524,9 @@ public function testOpenTempStreamWithBogusFileClosesTheConnection()
506524 */
507525 public function testEncodedCookiesInRequestHeaders ()
508526 {
527+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
528+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
529+ }
509530 $ this ->_client ->addCookie ('foo ' , 'bar=baz ' );
510531 $ this ->_client ->send ();
511532 $ cookieValue = 'Cookie: foo= ' .urlencode ('bar=baz ' );
@@ -520,6 +541,9 @@ public function testEncodedCookiesInRequestHeaders()
520541 */
521542 public function testRawCookiesInRequestHeaders ()
522543 {
544+ if (!constant ('TESTS_ZEND_HTTP_CLIENT_ONLINE ' )) {
545+ $ this ->markTestSkipped ('Zend\Http\Client online tests are not enabled ' );
546+ }
523547 $ this ->_client ->setOptions (array ('encodecookies ' => false ));
524548 $ this ->_client ->addCookie ('foo ' , 'bar=baz ' );
525549 $ this ->_client ->send ();
0 commit comments