public function BrowserTestBaseTest::testGoTo in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php \Drupal\Tests\simpletest\Functional\BrowserTestBaseTest::testGoTo()
Tests basic page test.
File
- core/
modules/ simpletest/ tests/ src/ Functional/ BrowserTestBaseTest.php, line 32 - Contains \Drupal\Tests\simpletest\Functional\BrowserTestBaseTest.
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\Tests\simpletest\FunctionalCode
public function testGoTo() {
$account = $this
->drupalCreateUser();
$this
->drupalLogin($account);
// Visit a Drupal page that requires login.
$this
->drupalGet('test-page');
$this
->assertSession()
->statusCodeEquals(200);
// Test page contains some text.
$this
->assertSession()
->pageTextContains('Test page text.');
}