function AggregatorPluginManagerTest::testProcessorInfoAlter

Same name in other branches
  1. 9 core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php \Drupal\Tests\aggregator\Kernel\AggregatorPluginManagerTest::testProcessorInfoAlter()

Tests that the fetcher info alter hook works.

File

core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php, line 44

Class

AggregatorPluginManagerTest
Tests the aggregator plugin manager.

Namespace

Drupal\Tests\aggregator\Kernel

Code

public function testProcessorInfoAlter() {
    $widget_definition = \Drupal::service('plugin.manager.aggregator.processor')->getDefinition('aggregator_test_processor');
    // Test if hook_aggregator_processor_info_alter is being called.
    $this->assertTrue($widget_definition['definition_altered'], "The 'aggregator_test_processor' plugin definition was updated in `hook_aggregator_processor_info_alter()`");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.