protected function EmailItemTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/Email/EmailItemTest.php \Drupal\field\Tests\Email\EmailItemTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldUnitTestBase::setUp
File
- core/
modules/ field/ src/ Tests/ Email/ EmailItemTest.php, line 21 - Contains \Drupal\field\Tests\Email\EmailItemTest.
Class
- EmailItemTest
- Tests the new entity API for the email field type.
Namespace
Drupal\field\Tests\EmailCode
protected function setUp() {
parent::setUp();
// Create an email field storage and field for validation.
entity_create('field_storage_config', array(
'field_name' => 'field_email',
'entity_type' => 'entity_test',
'type' => 'email',
))
->save();
entity_create('field_config', array(
'entity_type' => 'entity_test',
'field_name' => 'field_email',
'bundle' => 'entity_test',
))
->save();
// Create a form display for the default form mode.
entity_get_form_display('entity_test', 'entity_test', 'default')
->setComponent('field_email', array(
'type' => 'email_default',
))
->save();
}