public function testImportUrlSetsNullVersionIfNoVersionHeaderOnFeed() { $this->adapter->setResponse($this->httpFeedSampleWithoutVersion); $feed = $this->service->getFeed('http://www.example.com'); $this->assertEquals(null, $feed->getMajorProtocolVersion()); $this->assertEquals(null, $feed->getMinorProtocolVersion()); foreach ($feed as $entry) { $this->assertEquals(null, $entry->getMajorProtocolVersion()); $this->assertEquals(null, $entry->getMinorProtocolVersion()); } }
public function testReloadInheritsClassname() { $className = '\\ZendGData\\Entry'; $etag = Etag::fromString('Etag: ABCD1234'); $this->service->setMajorProtocolVersion(2); $this->adapter->setResponse($this->httpEntrySample); $entry = new $className(); $entry->setService($this->service); $entry->link = array(new Extension\Link('http://www.example.com', 'edit', 'application/atom+xml')); $entry->setEtag($etag); $newEntry = $entry->reload(); $this->assertEquals('ZendGData\\Entry', get_class($newEntry)); }
public function setServerResponseTo($nativeVars) { $response = $this->getServerResponseFor($nativeVars); $this->httpAdapter->setResponse($response); }