Exemple #1
0
 public function setUp()
 {
     $this->entryText = file_get_contents('Zend/GData/App/_files/EntrySample1.xml', true);
     $this->httpEntrySample = file_get_contents('Zend/GData/App/_files/EntrySampleHttp1.txt', true);
     $this->entry = new App\Entry();
     $this->adapter = new \ZendTest\GData\TestAsset\MockHttpClient();
     $this->client = new GData\HttpClient();
     $this->client->setAdapter($this->adapter);
     $this->service = new App($this->client);
 }
Exemple #2
0
 public function setUp()
 {
     $this->fileName = 'Zend/GData/App/_files/FeedSample1.xml';
     $this->expectedEtagValue = 'W/"CkcHQH8_fCp7ImA9WxRTGEw."';
     $this->expectedMajorProtocolVersion = 1;
     $this->expectedMinorProtocolVersion = 2;
     $this->httpEntrySample = file_get_contents('Zend/GData/_files/AppSample1.txt', true);
     $this->httpEntrySampleWithoutVersion = file_get_contents('Zend/GData/_files/AppSample2.txt', true);
     $this->httpFeedSample = file_get_contents('Zend/GData/_files/AppSample3.txt', true);
     $this->httpFeedSampleWithoutVersion = file_get_contents('Zend/GData/_files/AppSample4.txt', true);
     $this->adapter = new TestAsset\MockHttpClient();
     $this->client = new GData\HttpClient();
     $this->client->setAdapter($this->adapter);
     $this->service = new App($this->client);
 }
Exemple #3
0
 /**
  * @expectedException Zend\Gdata\App\HttpException
  */
 public function testGetAuthSubTokenInfoCatchesHttpClientException()
 {
     $adapter = new AdapterTest();
     $adapter->setNextRequestWillFail(true);
     $client = new GData\HttpClient();
     $client->setUri('http://example.com/AuthSub');
     $client->setAdapter($adapter);
     $revoked = GData\AuthSub::getAuthSubTokenInfo($this->token, $client);
 }