3 namespace Drupal\Tests\aggregator\Functional;
6 * Tests the fetcher plugins functionality and discoverability.
10 * @see \Drupal\aggregator_test\Plugin\aggregator\fetcher\TestFetcher.
12 class FeedFetcherPluginTest extends AggregatorTestBase {
17 protected function setUp() {
19 // Enable test plugins.
20 $this->enableTestPlugins();
22 $this->createSampleNodes();
26 * Test fetching functionality.
28 public function testfetch() {
29 // Create feed with local url.
30 $feed = $this->createFeed();
31 $this->updateFeedItems($feed);
32 $this->assertFalse(empty($feed->items));
34 // Delete items and restore checked property to 0.
35 $this->deleteFeedItems($feed);
36 // Change its name and try again.
37 $feed->setTitle('Do not fetch');
39 $this->updateFeedItems($feed);
40 // Fetch should fail due to feed name.
41 $this->assertTrue(empty($feed->items));