public function itAddsResponseFeedbackIfSSHKeyPushFails() { $params = array('user' => $this->user, 'html' => ''); $this->user_account_manager->throwOn('pushSSHKeys', new Git_UserSynchronisationException()); $response = mock('Response'); $GLOBALS['Response'] = $response; expect($response)->addFeedback()->once(); $this->plugin->getRemoteServersForUser($params); }