You are here

protected function BrowserTestBase::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUp()
  2. 9 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUp()
33 calls to BrowserTestBase::setUp()
AjaxFormPageCacheTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
AjaxInGroupTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
CaseInsensitivePathTest::setUp in core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
ClaroLayoutBuilderTest::setUp in core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
ClaroViewsUiTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php

... See full list

34 methods override BrowserTestBase::setUp()
AjaxFormPageCacheTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php
AjaxInGroupTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php
CaseInsensitivePathTest::setUp in core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php
ClaroLayoutBuilderTest::setUp in core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php
ClaroViewsUiTest::setUp in core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php

... See full list

File

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

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\Tests

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->setUpAppRoot();

  // Allow tests to compare MarkupInterface objects via assertEquals().
  $this
    ->registerComparator(new MarkupInterfaceComparator());
  $this
    ->setupBaseUrl();

  // Install Drupal test site.
  $this
    ->prepareEnvironment();
  $this
    ->installDrupal();

  // Setup Mink.
  $this
    ->initMink();

  // Set up the browser test output file.
  $this
    ->initBrowserOutputFile();

  // Ensure that the test is not marked as risky because of no assertions. In
  // PHPUnit 6 tests that only make assertions using $this->assertSession()
  // can be marked as risky.
  $this
    ->addToAssertionCount(1);
}