You are here

public function FormModeManagerUiTest::testFormModeManagerNodeLocalTasks in Form mode manager 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/FormModeManagerUiTest.php \Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFormModeManagerNodeLocalTasks()

Test Form mode manager Local tasks.

File

tests/src/Functional/FormModeManagerUiTest.php, line 123

Class

FormModeManagerUiTest
Tests the Form mode manager user interfaces.

Namespace

Drupal\Tests\form_mode_manager\Functional

Code

public function testFormModeManagerNodeLocalTasks() {
  Role::load($this->adminUser
    ->getRoles()[1])
    ->grantPermission('access content overview')
    ->save();
  $this
    ->drupalGet("node/{$this->nodes[0]->id()}/edit");
  $this
    ->assertLocalTasks([
    "Edit as Default",
    "Edit as {$this->nodeFormMode->label()}",
  ]);
}