Correct mock for ServerInterface 🎾

This commit is contained in:
Elfet 2014-07-08 17:12:56 +04:00
parent 62ec61bdcf
commit 7dc5415125

View File

@ -35,7 +35,18 @@ class DeployerTester extends \PHPUnit_Framework_TestCase
$helperSetMock
);
Deployer::$servers['main'] = $this->getMock('Deployer\Server\ServerInterface');
$main = $this->getMock('Deployer\Server\ServerInterface');
$config = $this->getMockBuilder('Deployer\Server\Configuration')->disableOriginalConstructor()->getMock();
$env = $this->getMockBuilder('Deployer\Server\Environment')->disableOriginalConstructor()->getMock();
$main->expects($this->any())
->method('getConfiguration')
->will($this->returnValue($config));
$main->expects($this->any())
->method('getEnvironment')
->will($this->returnValue($env));
Deployer::$servers['main'] = $main;
}
protected function tearDown()