public function itThrowsAnExceptionIfGerritPushFails() { expect($this->gerrit_user_account_manager)->pushSSHKeys()->once(); $this->gerrit_user_account_manager->throwOn('pushSSHKeys', new Git_UserSynchronisationException()); $this->expectException('Git_UserSynchronisationException'); $this->user_account_manager->pushSSHKeys($this->user); }
private function updateGerrit(PFUser $user) { $this->logger->debug('Update ssh keys in Gerrit'); $this->git_user_account_manager->synchroniseSSHKeys($this->getKeysFromString($this->getOriginalSSHKeys()), $user->getAuthorizedKeysArray(), $user); }