public function itThrowsAnExceptionIfGerritSynchFails() { expect($this->gerrit_user_account_manager)->synchroniseSSHKeys()->once(); $this->gerrit_user_account_manager->throwOn('synchroniseSSHKeys', new Git_UserSynchronisationException()); $this->expectException('Git_UserSynchronisationException'); $this->user_account_manager->synchroniseSSHKeys($this->original_keys, $this->new_keys, $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); }