public function testThatAppCanBeConstructed() { $application = new Application('unix:///var/run/docker.sock', '/etc/hosts', 'docker'); $this->assertSame('unix:///var/run/docker.sock', PropertyAccessor::getProperty($application, 'entrypoint')); $this->assertSame('/etc/hosts', PropertyAccessor::getProperty($application, 'hostsFile')); $this->assertSame('docker', PropertyAccessor::getProperty($application, 'tld')); $this->assertInstanceOf(DockerClient::class, PropertyAccessor::getProperty($application, 'client')); $this->assertInstanceOf(Docker::class, PropertyAccessor::getProperty($application, 'docker')); }
public function testThatAppCanBeConstructed() { $docker = $this->prophesize('DockerHostManager\\Docker\\Docker'); $docker = $docker->reveal(); $application = new Synchronizer($docker, '/etc/hosts', 'docker'); $this->assertSame($docker, PropertyAccessor::getProperty($application, 'docker')); $this->assertSame('/etc/hosts', PropertyAccessor::getProperty($application, 'hostsFile')); $this->assertSame('docker', PropertyAccessor::getProperty($application, 'tld')); $this->assertInstanceOf(Docker::class, PropertyAccessor::getProperty($application, 'docker')); $this->assertInternalType('array', PropertyAccessor::getProperty($application, 'activeContainers')); }