class AggregatorLocalTasksTest

Tests existence of aggregator local tasks.

@group aggregator @group legacy

Hierarchy

Expanded class hierarchy of AggregatorLocalTasksTest

File

core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php, line 13

Namespace

Drupal\Tests\aggregator\Unit\Menu
View source
class AggregatorLocalTasksTest extends LocalTaskIntegrationTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    $this->directoryList = [
      'aggregator' => 'core/modules/aggregator',
    ];
    parent::setUp();
  }
  
  /**
   * Tests local task existence.
   *
   * @dataProvider getAggregatorAdminRoutes
   */
  public function testAggregatorAdminLocalTasks($route) {
    $this->assertLocalTasks($route, [
      0 => [
        'aggregator.admin_overview',
        'aggregator.admin_settings',
      ],
    ]);
  }
  
  /**
   * Provides a list of routes to test.
   */
  public function getAggregatorAdminRoutes() {
    return [
      [
        'aggregator.admin_overview',
      ],
      [
        'aggregator.admin_settings',
      ],
    ];
  }
  
  /**
   * Checks aggregator source tasks.
   *
   * @dataProvider getAggregatorSourceRoutes
   */
  public function testAggregatorSourceLocalTasks($route) {
    $this->assertLocalTasks($route, [
      0 => [
        'entity.aggregator_feed.canonical',
        'entity.aggregator_feed.edit_form',
        'entity.aggregator_feed.delete_form',
      ],
    ]);
  }
  
  /**
   * Provides a list of source routes to test.
   */
  public function getAggregatorSourceRoutes() {
    return [
      [
        'entity.aggregator_feed.canonical',
      ],
      [
        'entity.aggregator_feed.edit_form',
      ],
    ];
  }

}

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