You are here

public function BrowserTestBaseTest::testDrupalGet in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testDrupalGet()

Tests drupalGet().

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 84

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testDrupalGet() {
  $this
    ->drupalGet('test-page');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->addressEquals('test-page');
  $this
    ->drupalGet('/test-page');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->addressEquals('test-page');
  $this
    ->drupalGet('/test-page/');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->addressEquals('/test-page/');
}