protected function TestItemTest::setUp in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/field/src/Tests/TestItemTest.php \Drupal\field\Tests\TestItemTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldUnitTestBase::setUp
File
- core/
modules/ field/ src/ Tests/ TestItemTest.php, line 35 - Contains \Drupal\field\Tests\TestItemTest.
Class
- TestItemTest
- Tests the new entity API for the test field type.
Namespace
Drupal\field\TestsCode
protected function setUp() {
parent::setUp();
// Create a 'test_field' field and storage for validation.
entity_create('field_storage_config', array(
'field_name' => $this->fieldName,
'entity_type' => 'entity_test',
'type' => 'test_field',
))
->save();
entity_create('field_config', array(
'entity_type' => 'entity_test',
'field_name' => $this->fieldName,
'bundle' => 'entity_test',
))
->save();
}