You are here

public function DevelStateEditorTest::testStateEditMenuLink in Devel 8

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::testStateEditMenuLink()
  2. 8.2 tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::testStateEditMenuLink()
  3. 4.x tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::testStateEditMenuLink()

Tests state editor menu link.

File

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

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');
}