public function BrowserTestBaseTest::testDrupalGet in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testDrupalGet()
- 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testDrupalGet()
Tests drupalGet().
File
- core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 95
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
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/');
}