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