function BrowserTestBase::setUpAppRoot

Same name in other branches
  1. 10 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUpAppRoot()
  2. 11.x core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUpAppRoot()

Sets up the root application path.

3 calls to BrowserTestBase::setUpAppRoot()
BrowserTestBase::setUp in core/tests/Drupal/Tests/BrowserTestBase.php
InstallerTestBase::setUp in core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php
UpdatePathTestBase::setUp in core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
Overrides BrowserTestBase::setUp() for update testing.

File

core/tests/Drupal/Tests/BrowserTestBase.php, line 383

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\Tests

Code

protected function setUpAppRoot() : void {
    if ($this->root === NULL) {
        $this->root = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.