public function testGetListWithIncorrectXml() { $saved_search_list_xml = file_get_contents(dirname(__FILE__) . '/data/savedsearchlist_missing_parameter.xml'); $this->oauthClient->expects($this->once())->method('authenticatedGetAsXml')->with($this->equalTo('savedSearch/list'), $this->equalTo(array('all' => 'true')))->will($this->returnValue($saved_search_list_xml)); $this->setExpectedException('CultureFeed_ParseException'); $result = $this->savedSearches->getList(TRUE); }
/** * {@inheritdoc} */ public function getList($allConsumers = FALSE) { $cid = 'list:' . DrupalCulturefeed::getLoggedInUserId() . ':' . $allConsumers; if ($cache = $this->cacheGet($cid)) { return $cache->data; } $data = $this->realCultureFeedSavedSearches->getList($allConsumers); $this->cacheSet($cid, $data, REQUEST_TIME + CULTUREFEED_CACHE_EXPIRES); return $data; }