function BlockContentTestBase::setUp
Same name in this branch
- 9 core/modules/block_content/tests/src/Functional/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\BlockContentTestBase::setUp()
Same name and namespace in other branches
- 8.9.x core/modules/block_content/src/Tests/Views/BlockContentTestBase.php \Drupal\block_content\Tests\Views\BlockContentTestBase::setUp()
- 8.9.x core/modules/block_content/src/Tests/BlockContentTestBase.php \Drupal\block_content\Tests\BlockContentTestBase::setUp()
- 8.9.x core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase::setUp()
- 8.9.x core/modules/block_content/tests/src/Functional/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\BlockContentTestBase::setUp()
- 10 core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase::setUp()
- 10 core/modules/block_content/tests/src/Functional/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\BlockContentTestBase::setUp()
- 11.x core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase::setUp()
- 11.x core/modules/block_content/tests/src/Functional/BlockContentTestBase.php \Drupal\Tests\block_content\Functional\BlockContentTestBase::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 ViewTestBase::setUp
1 call to BlockContentTestBase::setUp()
- BlockContentFieldFilterTest::setUp in core/
modules/ block_content/ tests/ src/ Functional/ Views/ BlockContentFieldFilterTest.php - Sets up the test.
1 method overrides BlockContentTestBase::setUp()
- BlockContentFieldFilterTest::setUp in core/
modules/ block_content/ tests/ src/ Functional/ Views/ BlockContentFieldFilterTest.php - Sets up the test.
File
-
core/
modules/ block_content/ tests/ src/ Functional/ Views/ BlockContentTestBase.php, line 45
Class
- BlockContentTestBase
- Base class for all block_content tests.
Namespace
Drupal\Tests\block_content\Functional\ViewsCode
protected function setUp($import_test_views = TRUE, $modules = [
'block_content_test_views',
]) {
parent::setUp($import_test_views, $modules);
// Ensure the basic bundle exists. This is provided by the standard profile.
$this->createBlockContentType([
'id' => 'basic',
]);
$this->adminUser = $this->drupalCreateUser($this->permissions);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.