function UpdateMiscTest::testLocalActions

Ensures that the local actions appear.

File

core/modules/update/tests/src/Functional/UpdateMiscTest.php, line 46

Class

UpdateMiscTest
Tests general functionality of the Update module.

Namespace

Drupal\Tests\update\Functional

Code

public function testLocalActions() : void {
  $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');
}

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