From d93eb9d5703ab26bfc3348cd5cfbcf195fd42a2c Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Thu, 26 Jan 2017 16:50:02 +0100 Subject: [PATCH] Fixed the unit test for phpunit 4.8.33 --- test/Client/CommonHttpTests.php | 2 +- test/Client/ProxyAdapterTest.php | 2 +- test/Client/StaticClientTest.php | 2 +- test/Client/UseCaseTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Client/CommonHttpTests.php b/test/Client/CommonHttpTests.php index 6cf8bf53d8..8e622fe0db 100644 --- a/test/Client/CommonHttpTests.php +++ b/test/Client/CommonHttpTests.php @@ -75,7 +75,7 @@ abstract class CommonHttpTests extends \PHPUnit_Framework_TestCase protected function setUp() { if (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') - && (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') != false)) { + && (filter_var(getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'), FILTER_VALIDATE_BOOLEAN) != false)) { $this->baseuri = getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'); if (substr($this->baseuri, -1) != '/') { $this->baseuri .= '/'; diff --git a/test/Client/ProxyAdapterTest.php b/test/Client/ProxyAdapterTest.php index e2bc120861..fcb06569cf 100644 --- a/test/Client/ProxyAdapterTest.php +++ b/test/Client/ProxyAdapterTest.php @@ -35,7 +35,7 @@ class ProxyAdapterTest extends SocketTest protected function setUp() { if (getenv('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY') && - getenv('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY')) { + filter_var(getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'), FILTER_VALIDATE_BOOLEAN)) { list($host, $port) = explode(':', getenv('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY'), 2); if (! $host) { diff --git a/test/Client/StaticClientTest.php b/test/Client/StaticClientTest.php index 29f6dce2e2..6567814eef 100644 --- a/test/Client/StaticClientTest.php +++ b/test/Client/StaticClientTest.php @@ -33,7 +33,7 @@ class StaticClientTest extends \PHPUnit_Framework_TestCase protected function setUp() { if (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') - && (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') != false)) { + && (filter_var(getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'), FILTER_VALIDATE_BOOLEAN) != false)) { $this->baseuri = getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'); if (substr($this->baseuri, -1) != '/') { $this->baseuri .= '/'; diff --git a/test/Client/UseCaseTest.php b/test/Client/UseCaseTest.php index 3d4529cba7..4b344ff27f 100644 --- a/test/Client/UseCaseTest.php +++ b/test/Client/UseCaseTest.php @@ -58,7 +58,7 @@ class UseCaseTest extends \PHPUnit_Framework_TestCase protected function setUp() { if (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') - && (getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI') != false) + && (filter_var(getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'), FILTER_VALIDATE_BOOLEAN) != false) ) { $this->baseuri = getenv('TESTS_ZEND_HTTP_CLIENT_BASEURI'); $this->client = new HTTPClient($this->baseuri);