/** * Test password with null value */ public function testPasswordWithNullValue() { $config = $this->getMockBuilder('Deployer\\Server\\Configuration')->disableOriginalConstructor()->getMock(); $env = $this->getMock('Deployer\\Server\\Environment'); $config->expects($this->once())->method('setAuthenticationMethod')->with(Configuration::AUTH_BY_PASSWORD)->will($this->returnSelf()); $config->expects($this->once())->method('setPassword')->with($this->isInstanceOf('Deployer\\Server\\Password\\CallablePasswordGetter'))->will($this->returnSelf()); $b = new Builder($config, $env); $b->password(); }