UpdateLocalTasksTest.php

Same filename and directory in other branches
  1. 9 core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
  2. 8.9.x core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
  3. 10 core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php

Namespace

Drupal\Tests\update\Unit\Menu

File

core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\update\Unit\Menu;

use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;

/**
 * Tests existence of update local tasks.
 *
 * @group update
 */
class UpdateLocalTasksTest extends LocalTaskIntegrationTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    $this->directoryList = [
      'update' => 'core/modules/update',
    ];
    parent::setUp();
  }
  
  /**
   * Checks update report tasks.
   *
   * @dataProvider getUpdateReportRoutes
   */
  public function testUpdateReportLocalTasks($route) : void {
    $this->assertLocalTasks($route, [
      0 => [
        'update.status',
        'update.settings',
      ],
    ]);
  }
  
  /**
   * Provides a list of report routes to test.
   */
  public static function getUpdateReportRoutes() {
    return [
      [
        'update.status',
      ],
      [
        'update.settings',
      ],
    ];
  }

}

Classes

Title Deprecated Summary
UpdateLocalTasksTest Tests existence of update local tasks.

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