protected function PhoneInternationalItemTest::setUp in International Phone 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/PhoneInternationalItemTest.php \Drupal\Tests\phone_international\Kernel\PhoneInternationalItemTest::setUp()
- 3.x tests/src/Kernel/PhoneInternationalItemTest.php \Drupal\Tests\phone_international\Kernel\PhoneInternationalItemTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldKernelTestBase::setUp
File
- tests/
src/ Kernel/ PhoneInternationalItemTest.php, line 64
Class
- PhoneInternationalItemTest
- Tests the new entity API for the phone_international field type.
Namespace
Drupal\Tests\phone_international\KernelCode
protected function setUp() {
parent::setUp();
// Create a phone_international field storage and field for validation.
FieldStorageConfig::create([
'field_name' => 'field_test',
'entity_type' => 'entity_test',
'type' => 'phone_international',
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'bundle' => 'entity_test',
])
->save();
}