public function itCheckUserSessionAndGroupValidity() { $svn_repository_listing = mock('SVN_RepositoryListing'); $svn_repository_listing->expectOnce('getSvnPaths', array($this->user, $this->project, $this->svn_path)); $svn_soap = new SVN_SOAPServer($this->soap_request_valid, $svn_repository_listing); $svn_soap->getSvnPath($this->session_key, $this->group_id, $this->svn_path); }
public function itCheckUserSessionAngGroupValidity() { $session_key = 'whatever'; $group_id = 123; $svn_path = '/tags'; $soap_request_valid = mock('SOAP_RequestValidator'); $svn_repository_listing = mock('SVN_RepositoryListing'); $project = mock('Project'); stub($soap_request_valid)->getProjectById($group_id, '*')->returns($project); $user = mock('User'); stub($soap_request_valid)->continueSession($session_key)->returns($user); $svn_soap = new SVN_SOAPServer($soap_request_valid, $svn_repository_listing); $svn_repository_listing->expectOnce('getSvnPath', array($user, $project, $svn_path)); $svn_soap->getSvnPath($session_key, $group_id, $svn_path); }