function ViewTestBase::setUp
Same name in other branches
- 8.9.x core/modules/views/src/Tests/ViewTestBase.php \Drupal\views\Tests\ViewTestBase::setUp()
- 8.9.x core/modules/views/tests/src/Functional/ViewTestBase.php \Drupal\Tests\views\Functional\ViewTestBase::setUp()
- 10 core/modules/views/tests/src/Functional/ViewTestBase.php \Drupal\Tests\views\Functional\ViewTestBase::setUp()
- 11.x core/modules/views/tests/src/Functional/ViewTestBase.php \Drupal\Tests\views\Functional\ViewTestBase::setUp()
Sets up the test.
Parameters
bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.
array $modules: The module directories to look in for test views.
Overrides BrowserTestBase::setUp
78 calls to ViewTestBase::setUp()
- AccessTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Plugin/ AccessTest.php - Sets up the test.
- AreaTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Handler/ AreaTest.php - Sets up the test.
- AreaTitleWebTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Handler/ AreaTitleWebTest.php - Sets up the test.
- ArgumentDefaultTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Plugin/ ArgumentDefaultTest.php - Sets up the test.
- BaseFieldAccessTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Entity/ BaseFieldAccessTest.php - Sets up the test.
78 methods override ViewTestBase::setUp()
- AccessTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Plugin/ AccessTest.php - Sets up the test.
- AreaTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Handler/ AreaTest.php - Sets up the test.
- AreaTitleWebTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Handler/ AreaTitleWebTest.php - Sets up the test.
- ArgumentDefaultTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Plugin/ ArgumentDefaultTest.php - Sets up the test.
- BaseFieldAccessTest::setUp in core/
modules/ views/ tests/ src/ Functional/ Entity/ BaseFieldAccessTest.php - Sets up the test.
File
-
core/
modules/ views/ tests/ src/ Functional/ ViewTestBase.php, line 42
Class
- ViewTestBase
- Defines a base class for Views testing in the full web test environment.
Namespace
Drupal\Tests\views\FunctionalCode
protected function setUp($import_test_views = TRUE, $modules = [
'views_test_config',
]) {
parent::setUp();
if ($import_test_views) {
ViewTestData::createTestViews(static::class, $modules);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.