Example #1
0
 /**
  * Test get password with use PasswordGetter system
  */
 public function testGetPasswordWithUsePasswordGetter()
 {
     $configuration = new Configuration('name', 'localhost', 80);
     $configuration->setUser('user');
     $passwordGetter = $this->getMockForAbstractClass('Deployer\\Server\\Password\\PasswordGetterInterface');
     $passwordGetter->expects($this->once())->method('getPassword')->with('localhost', 'user')->will($this->returnValue('some-password'));
     $configuration->setPassword($passwordGetter);
     $password = $configuration->getPassword();
     $this->assertEquals('some-password', $password, 'Password mismatch');
 }