Example #1
0
 public function setUp()
 {
     parent::setUp();
     $id = 456;
     $mocked_methods = array('getGerritServerFactory');
     $this->plugin = partial_mock('GitPlugin', $mocked_methods, array($id));
     $this->user_account_manager = mock('Git_UserAccountManager');
     $this->plugin->setUserAccountManager($this->user_account_manager);
     $this->gerrit_server_factory = mock('Git_RemoteServer_GerritServerFactory');
     stub($this->plugin)->getGerritServerFactory()->returns($this->gerrit_server_factory);
     $this->logger = mock('BackendLogger');
     $this->plugin->setLogger($this->logger);
     $this->user = mock('PFUser');
     $_POST['ssh_key_push'] = true;
 }