
| Current Path : /var/www/html1/bbp/web/core/modules/aggregator/tests/src/Unit/Menu/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/bbp/web/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php |
<?php
namespace Drupal\Tests\aggregator\Unit\Menu;
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;
/**
* Tests existence of aggregator local tasks.
*
* @group aggregator
*/
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'],
];
}
}