function BrowserTestBase::setUp
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUp()
- 10 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUp()
- 8.9.x core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::setUp()
108 methods override BrowserTestBase::setUp()
- AdminPathEntityConverterLanguageTest::setUp in core/
modules/ language/ tests/ src/ Functional/ AdminPathEntityConverterLanguageTest.php - BlockHookOperationTest::setUp in core/
modules/ block/ tests/ src/ Functional/ BlockHookOperationTest.php - BooleanFieldTest::setUp in core/
modules/ field/ tests/ src/ Functional/ Boolean/ BooleanFieldTest.php - BooleanFormatterSettingsTest::setUp in core/
modules/ field/ tests/ src/ Functional/ Boolean/ BooleanFormatterSettingsTest.php - BooleanFormatterSettingsTest::setUp in core/
modules/ field/ tests/ src/ FunctionalJavascript/ Boolean/ BooleanFormatterSettingsTest.php
File
-
core/
tests/ Drupal/ Tests/ BrowserTestBase.php, line 354
Class
- BrowserTestBase
- Provides a test case for functional Drupal tests.
Namespace
Drupal\TestsCode
protected function setUp() {
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.