You are here

public function UpdateSemverCoreTest::testLocalActions in Drupal 9

Ensures that the local actions appear.

File

core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php, line 458

Class

UpdateSemverCoreTest
Tests the Update Manager module through a series of functional tests using mock XML data.

Namespace

Drupal\Tests\update\Functional

Code

public function testLocalActions() {
  $admin_user = $this
    ->drupalCreateUser([
    'administer site configuration',
    'administer modules',
    'administer software updates',
    'administer themes',
  ]);
  $this
    ->drupalLogin($admin_user);
  $this
    ->drupalGet('admin/modules');
  $this
    ->clickLink('Add new module');
  $this
    ->assertSession()
    ->addressEquals('admin/modules/install');
  $this
    ->drupalGet('admin/appearance');
  $this
    ->clickLink('Add new theme');
  $this
    ->assertSession()
    ->addressEquals('admin/theme/install');
  $this
    ->drupalGet('admin/reports/updates');
  $this
    ->clickLink('Add new module or theme');
  $this
    ->assertSession()
    ->addressEquals('admin/reports/updates/install');
}