示例#1
0
 /**
  * Test set pem file for connection
  */
 public function testPem()
 {
     $config = $this->getMockBuilder('Deployer\\Server\\Configuration')->disableOriginalConstructor()->getMock();
     $env = $this->getMock('Deployer\\Server\\Environment');
     $config->expects($this->once())->method('setAuthenticationMethod')->with(Configuration::AUTH_BY_PEM_FILE)->will($this->returnSelf());
     $config->expects($this->once())->method('setPemFile')->with('~/.pem')->will($this->returnSelf());
     $b = new Builder($config, $env);
     $b->pemFile('~/.pem');
 }