You are here

protected function FeedsFetcherResultTest::getRestoredFetcherResult in Feeds 7.2

Serializes and unserializes a FeedsFetcherResult instance.

Parameters

FeedsFetcherResult $result: (optional) A FeedsFetcherResult instance.

Return value

FeedsFetcherResult A FeedsFetcherResult instance, after being serialized and unserialized.

2 calls to FeedsFetcherResultTest::getRestoredFetcherResult()
FeedsFetcherResultTest::testGetRaw in tests/FeedsFetcherResultTest.test
@covers FeedsFetcherResult::getRaw().
FeedsFetcherResultTest::testRawExists in tests/FeedsFetcherResultTest.test
@covers FeedsFetcherResult::rawExists().

File

tests/FeedsFetcherResultTest.test, line 68

Class

FeedsFetcherResultTest
@coversDefaultClass FeedsFetcherResult @group feeds

Code

protected function getRestoredFetcherResult(FeedsFetcherResult $result = NULL) {
  if (is_null($result)) {
    $result = $this->fetcherResult;
  }
  $serialized = serialize($this->fetcherResult);
  return unserialize($serialized);
}