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