function PasswordItemTest::setUp
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php \Drupal\KernelTests\Core\Field\FieldType\PasswordItemTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php \Drupal\KernelTests\Core\Field\FieldType\PasswordItemTest::setUp()
Overrides FieldKernelTestBase::setUp
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Field/ FieldType/ PasswordItemTest.php, line 37
Class
- PasswordItemTest
- @coversDefaultClass \Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem @group Field
Namespace
Drupal\KernelTests\Core\Field\FieldTypeCode
protected function setUp() : void {
parent::setUp();
$this->fieldStorage = FieldStorageConfig::create([
'field_name' => 'test_field',
'entity_type' => 'entity_test',
'type' => 'password',
]);
$this->fieldStorage
->save();
$this->field = FieldConfig::create([
'field_storage' => $this->fieldStorage,
'bundle' => 'entity_test',
'required' => TRUE,
]);
$this->field
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.