diff --git a/example/phpunit.all.xml b/example/phpunit.all.xml index 02a047d51..e36de9e7d 100644 --- a/example/phpunit.all.xml +++ b/example/phpunit.all.xml @@ -29,8 +29,6 @@ - - diff --git a/example/phpunit.consumer.xml b/example/phpunit.consumer.xml index 0e521db3e..7e45945ea 100644 --- a/example/phpunit.consumer.xml +++ b/example/phpunit.consumer.xml @@ -17,8 +17,6 @@ - - diff --git a/example/phpunit.core.xml b/example/phpunit.core.xml index 57e6e2e40..e33f650e0 100644 --- a/example/phpunit.core.xml +++ b/example/phpunit.core.xml @@ -17,8 +17,6 @@ - - diff --git a/phpunit.xml b/phpunit.xml index af9ebf685..a2b66f818 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,8 +18,6 @@ - - diff --git a/src/PhpPact/Standalone/MockService/MockServerEnvConfig.php b/src/PhpPact/Standalone/MockService/MockServerEnvConfig.php index 7e90a93df..a8183b2aa 100644 --- a/src/PhpPact/Standalone/MockService/MockServerEnvConfig.php +++ b/src/PhpPact/Standalone/MockService/MockServerEnvConfig.php @@ -14,8 +14,14 @@ class MockServerEnvConfig extends MockServerConfig */ public function __construct() { - $this->setHost($this->parseEnv('PACT_MOCK_SERVER_HOST')); - $this->setPort((int) $this->parseEnv('PACT_MOCK_SERVER_PORT')); + if ($host = $this->parseEnv('PACT_MOCK_SERVER_HOST', false)) { + $this->setHost($host); + } + + if ($port = $this->parseEnv('PACT_MOCK_SERVER_PORT', false)) { + $this->setPort((int) $port); + } + $this->setConsumer($this->parseEnv('PACT_CONSUMER_NAME')); $this->setProvider($this->parseEnv('PACT_PROVIDER_NAME')); $this->setPactDir($this->parseEnv('PACT_OUTPUT_DIR', false));