public function mockCreateLoginUrl($destination_url)
 {
     $this->apiProxyMock = new google\appengine\testing\ApiProxyMock();
     $this->apiProxyMock->init($this);
     $req = new \google\appengine\CreateLoginURLRequest();
     $req->setDestinationUrl($destination_url);
     $resp = new \google\appengine\CreateLoginURLResponse();
     $resp->setLoginUrl('http://www');
     $this->apiProxyMock->expectCall('user', 'CreateLoginURL', $req, $resp);
 }
Пример #2
0
 public function testCreateLoginOtherApplicationError()
 {
     $req = new \google\appengine\CreateLoginURLRequest();
     $req->setDestinationUrl('http://abc');
     $exception = new \google\appengine\runtime\ApplicationError(123, 'yyy');
     $this->setExpectedException('\\google\\appengine\\runtime\\ApplicationError', 'yyy');
     $this->apiProxyMock->expectCall('user', 'CreateLoginURL', $req, $exception);
     UserService::createLoginURL('http://abc');
 }