public function AggregatorPluginManagerTest::testFetcherInfoAlter in Drupal 8
Same name and namespace in other branches
- 9 core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php \Drupal\Tests\aggregator\Kernel\AggregatorPluginManagerTest::testFetcherInfoAlter()
Tests that the fetcher info alter hook works.
File
- core/
modules/ aggregator/ tests/ src/ Kernel/ AggregatorPluginManagerTest.php, line 24
Class
- AggregatorPluginManagerTest
- Tests the aggregator plugin manager.
Namespace
Drupal\Tests\aggregator\KernelCode
public function testFetcherInfoAlter() {
$widget_definition = \Drupal::service('plugin.manager.aggregator.fetcher')
->getDefinition('aggregator_test_fetcher');
// Test if hook_aggregator_fetcher_info_alter is being called.
$this
->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_fetcher' plugin definition was updated in `hook_aggregator_fetcher_info_alter()`");
}