protected function DisplayJsonFeedTest::getFeedLastPage in JSON Feed 8
Retrieve last page of feed items.
Return value
array An array of JSON feed attributes/items.
1 call to DisplayJsonFeedTest::getFeedLastPage()
- DisplayJsonFeedTest::testFeedLastPage in tests/
src/ Functional/ DisplayJsonFeedTest.php - Test last page of feed items.
File
- tests/
src/ Functional/ DisplayJsonFeedTest.php, line 221
Class
- DisplayJsonFeedTest
- Tests the json_feed display plugin.
Namespace
Drupal\Tests\json_feed\FunctionalCode
protected function getFeedLastPage() {
$feed_content = Json::decode($this
->drupalGet($this->feedPath, [
'query' => [
'_format' => 'json',
],
]));
if (empty($feed_content['next_url'])) {
return $feed_content;
}
while (!empty($feed_content['next_url'])) {
$feed_content = $this
->getFeedNextPage($feed_content);
}
return $feed_content;
}