Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / aggregator / tests / src / Unit / Menu / AggregatorLocalTasksTest.php
1 <?php
2
3 namespace Drupal\Tests\aggregator\Unit\Menu;
4
5 use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;
6
7 /**
8  * Tests existence of aggregator local tasks.
9  *
10  * @group aggregator
11  */
12 class AggregatorLocalTasksTest extends LocalTaskIntegrationTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected function setUp() {
18     $this->directoryList = ['aggregator' => 'core/modules/aggregator'];
19     parent::setUp();
20   }
21
22   /**
23    * Tests local task existence.
24    *
25    * @dataProvider getAggregatorAdminRoutes
26    */
27   public function testAggregatorAdminLocalTasks($route) {
28     $this->assertLocalTasks($route, [
29       0 => ['aggregator.admin_overview', 'aggregator.admin_settings'],
30     ]);
31   }
32
33   /**
34    * Provides a list of routes to test.
35    */
36   public function getAggregatorAdminRoutes() {
37     return [
38       ['aggregator.admin_overview'],
39       ['aggregator.admin_settings'],
40     ];
41   }
42
43   /**
44    * Checks aggregator source tasks.
45    *
46    * @dataProvider getAggregatorSourceRoutes
47    */
48   public function testAggregatorSourceLocalTasks($route) {
49     $this->assertLocalTasks($route, [
50       0 => ['entity.aggregator_feed.canonical', 'entity.aggregator_feed.edit_form', 'entity.aggregator_feed.delete_form'],
51     ]);
52     ;
53   }
54
55   /**
56    * Provides a list of source routes to test.
57    */
58   public function getAggregatorSourceRoutes() {
59     return [
60       ['entity.aggregator_feed.canonical'],
61       ['entity.aggregator_feed.edit_form'],
62     ];
63   }
64
65 }