Added some tests to BuilderTest

This commit is contained in:
Kennedy Tedesco 2015-02-04 10:52:00 -02:00
parent 28a924b838
commit d2a5a0bae2

View File

@ -30,6 +30,24 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
$b->user('user', 'password');
}
public function testHostAndPort()
{
$config = $this->getMockBuilder('Deployer\Server\Configuration')->disableOriginalConstructor()->getMock();
$config->expects($this->once())
->method('setHost')
->with('localhost')
->will($this->returnSelf());
$config->expects($this->once())
->method('setPort')
->with(22)
->will($this->returnSelf());
$env = $this->getMock('Deployer\Server\Environment');
$b = new Builder($config, $env);
$b->host('localhost');
$b->port(22);
}
public function testConfig()
{
$config = $this->getMockBuilder('Deployer\Server\Configuration')->disableOriginalConstructor()->getMock();