function DevelStateEditorTest::testStateEditMenuLink

Same name in other branches
  1. 8.x-1.x tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::testStateEditMenuLink()
  2. 5.x tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::testStateEditMenuLink()

Tests state editor menu link.

File

tests/src/Functional/DevelStateEditorTest.php, line 33

Class

DevelStateEditorTest
Tests devel state editor.

Namespace

Drupal\Tests\devel\Functional

Code

public function testStateEditMenuLink() {
    $this->drupalPlaceBlock('system_menu_block:devel');
    $this->drupalLogin($this->develUser);
    // Ensures that the state editor link is present on the devel menu and that
    // it points to the correct page.
    $this->drupalGet('');
    $this->clickLink('State editor');
    $this->assertSession()
        ->statusCodeEquals(200);
    $this->assertSession()
        ->addressEquals('/devel/state');
    $this->assertSession()
        ->pageTextContains('State editor');
}