TaxonomyLocalTasksTest.php in Drupal 10
File
core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
View source
<?php
namespace Drupal\Tests\taxonomy\Unit\Menu;
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;
class TaxonomyLocalTasksTest extends LocalTaskIntegrationTestBase {
protected function setUp() : void {
$this->directoryList = [
'taxonomy' => 'core/modules/taxonomy',
];
parent::setUp();
}
public function testTaxonomyPageLocalTasks($route, $subtask = []) {
$tasks = [
0 => [
'entity.taxonomy_term.canonical',
'entity.taxonomy_term.edit_form',
'entity.taxonomy_term.delete_form',
],
];
if ($subtask) {
$tasks[] = $subtask;
}
$this
->assertLocalTasks($route, $tasks);
}
public function getTaxonomyPageRoutes() {
return [
[
'entity.taxonomy_term.canonical',
],
[
'entity.taxonomy_term.edit_form',
],
];
}
}