function FeedFetcherPluginTest::testfetch
Same name in other branches
- 8.9.x core/modules/aggregator/tests/src/Functional/FeedFetcherPluginTest.php \Drupal\Tests\aggregator\Functional\FeedFetcherPluginTest::testfetch()
Tests fetching functionality.
File
-
core/
modules/ aggregator/ tests/ src/ Functional/ FeedFetcherPluginTest.php, line 34
Class
- FeedFetcherPluginTest
- Tests the fetcher plugins functionality and discoverability.
Namespace
Drupal\Tests\aggregator\FunctionalCode
public function testfetch() {
// Create feed with local url.
$feed = $this->createFeed();
$this->updateFeedItems($feed);
$this->assertNotEmpty($feed->items);
// Delete items and restore checked property to 0.
$this->deleteFeedItems($feed);
// Change its name and try again.
$feed->setTitle('Do not fetch');
$feed->save();
$this->updateFeedItems($feed);
// Fetch should fail due to feed name.
$this->assertEmpty($feed->items);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.