protected function RevisionUserTest::setUp in Drupal 9
Same name in this branch
- 9 core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php \Drupal\Tests\media\Kernel\Views\RevisionUserTest::setUp()
- 9 core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php \Drupal\Tests\block_content\Kernel\Views\RevisionUserTest::setUp()
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.
Overrides ViewsKernelTestBase::setUp
File
- core/
modules/ media/ tests/ src/ Kernel/ Views/ RevisionUserTest.php, line 68
Class
- RevisionUserTest
- Tests the media_revision_user field.
Namespace
Drupal\Tests\media\Kernel\ViewsCode
protected function setUp($import_test_views = TRUE) : void {
parent::setUp($import_test_views);
$this
->installEntitySchema('media');
$this
->installEntitySchema('file');
$this
->installSchema('file', 'file_usage');
$this
->installEntitySchema('user');
$this
->installConfig([
'field',
'system',
'image',
'file',
'media',
]);
if ($import_test_views) {
ViewTestData::createTestViews(get_class($this), [
'media_test_views',
]);
}
$this->testMediaType = $this
->createMediaType('test');
}