class FeedFetcherPluginTest
Same name and namespace in other branches
- 8.9.x core/modules/aggregator/tests/src/Functional/FeedFetcherPluginTest.php \Drupal\Tests\aggregator\Functional\FeedFetcherPluginTest
Tests the fetcher plugins functionality and discoverability.
@group aggregator @group legacy
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\aggregator\Functional\AggregatorTestBase extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\aggregator\Functional\FeedFetcherPluginTest extends \Drupal\Tests\aggregator\Functional\AggregatorTestBase
- class \Drupal\Tests\aggregator\Functional\AggregatorTestBase extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of FeedFetcherPluginTest
See also
\Drupal\aggregator_test\Plugin\aggregator\fetcher\TestFetcher.
File
-
core/
modules/ aggregator/ tests/ src/ Functional/ FeedFetcherPluginTest.php, line 13
Namespace
Drupal\Tests\aggregator\FunctionalView source
class FeedFetcherPluginTest extends AggregatorTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
// Enable test plugins.
$this->enableTestPlugins();
// Create some nodes.
$this->createSampleNodes();
}
/**
* Tests fetching functionality.
*/
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.