public function testGetSavedSearchWithIncorrectXml() { $incorrect_xml = file_get_contents(dirname(__FILE__) . '/data/savedsearch_missing_parameter.xml'); $this->oauthClient->expects($this->once())->method('authenticatedGetAsXml')->with('savedSearch/4')->will($this->returnValue($incorrect_xml)); $this->setExpectedException('CultureFeed_ParseException'); $this->savedSearches->getSavedSearch(4); }
/** * {@inheritdoc} */ public function getSavedSearch($savedSearchId) { $cid = 'detail:' . $savedSearchId; if ($cache = $this->cacheGet($cid)) { return $cache->data; } $data = $this->realCultureFeedSavedSearches->getSavedSearch($savedSearchId); $this->cacheSet($cid, $data, REQUEST_TIME + CULTUREFEED_CACHE_EXPIRES); return $data; }