function RelationshipUserFileDataTest::setUp
Same name in other branches
- 9 core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php \Drupal\Tests\file\Kernel\Views\RelationshipUserFileDataTest::setUp()
- 10 core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php \Drupal\Tests\file\Kernel\Views\RelationshipUserFileDataTest::setUp()
- 11.x core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php \Drupal\Tests\file\Kernel\Views\RelationshipUserFileDataTest::setUp()
Overrides ViewTestBase::setUp
File
-
core/
modules/ file/ tests/ src/ Functional/ Views/ RelationshipUserFileDataTest.php, line 38
Class
- RelationshipUserFileDataTest
- Tests file on user relationship handler.
Namespace
Drupal\Tests\file\Functional\ViewsCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
// Create the user profile field and instance.
FieldStorageConfig::create([
'entity_type' => 'user',
'field_name' => 'user_file',
'type' => 'file',
'translatable' => '0',
])->save();
FieldConfig::create([
'label' => 'User File',
'description' => '',
'field_name' => 'user_file',
'entity_type' => 'user',
'bundle' => 'user',
'required' => 0,
])->save();
ViewTestData::createTestViews(get_class($this), [
'file_test_views',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.