<?php

namespace Docker\Tests;

use Docker\Docker;
use Docker\Http\DockerClient as Client;
use PHPUnit_Framework_TestCase;

class TestCase extends PHPUnit_Framework_TestCase
{
    private $docker;

    public function getDocker()
    {
        $client = new Client();

        if (null === $this->docker) {
            $this->docker = new Docker($client);
        }

        return $this->docker;
    }
}
<?php

namespace Docker\Tests;

use Docker\Docker;
use Docker\Http\DockerClient as Client;
use PHPUnit_Framework_TestCase;

class TestCase extends PHPUnit_Framework_TestCase
{
    private $docker;

    public function getDocker()
    {
        $client = new Client(array(), 'tcp://127.0.0.1:4243');

        if (null === $this->docker) {
            $this->docker = new Docker($client);
        }

        return $this->docker;
    }
}
--- 
+++ 
@@ -12,7 +12,7 @@
 
     public function getDocker()
     {
-        $client = new Client(array(), 'tcp://127.0.0.1:4243');
+        $client = new Client();
 
         if (null === $this->docker) {
             $this->docker = new Docker($client);
Use default behavior to get docker host in tests, DOCKER_HOST env variable or unix:///var/run/docker.sock by default
