コード例 #1
0
 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 testCreateLoginURLAllArgs()
 {
     $req = new \google\appengine\CreateLoginURLRequest();
     $req->setDestinationUrl('http://abc');
     $req->setFederatedIdentity('xyz');
     $resp = new \google\appengine\CreateLoginURLResponse();
     $resp->setLoginUrl('http://www');
     $this->apiProxyMock->expectCall('user', 'CreateLoginURL', $req, $resp);
     $loginUrl = UserService::createLoginURL('http://abc', 'xyz');
     $this->assertEquals('http://www', $loginUrl);
     $this->apiProxyMock->verify();
 }