function PasswordItemTest::setUp
Same name and namespace 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 <a href="/api/drupal/core%21lib%21Drupal%21Core%21Field%21Plugin%21Field%21FieldType%21PasswordItem.php/class/PasswordItem/11.x" title="Defines the 'password' entity field type." class="local">\Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem</a> @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.