public function itThrowsAProjectDeletionExceptionIfThereAreOpenChanges() { $exception = new Git_Driver_Gerrit_RemoteSSHCommandFailure(1, '', 'error'); stub($this->ssh)->execute()->throws($exception); $this->expectException('ProjectDeletionException'); $this->driver->deleteProject($this->gerrit_server, 'project'); }
public function _itCallsTheRealThing() { $r = new GitRepository(); $r->setName('dusse'); $r->setNamespace('jean_claude'); //$p = new Project(array('unix_group_name' => 'LesBronzes', 'group_id' => 50)); $p = stub('Project')->getUnixName()->returns('LesBronzes'); $r->setProject($p); $driver = new Git_Driver_Gerrit(new Git_Driver_Gerrit_RemoteSSHCommand(new BackendLogger()), new BackendLogger()); $driver->createProject($r); }