function FieldConfigEntityUnitTest::testGetType
Same name and namespace in other branches
- 8.9.x core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldConfigEntityUnitTest::testGetType()
- 10 core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldConfigEntityUnitTest::testGetType()
- 11.x core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldConfigEntityUnitTest::testGetType()
@covers ::getType
File
-
core/
modules/ field/ tests/ src/ Unit/ FieldConfigEntityUnitTest.php, line 272
Class
- FieldConfigEntityUnitTest
- @coversDefaultClass <a href="/api/drupal/core%21modules%21field%21src%21Entity%21FieldConfig.php/class/FieldConfig/9" title="Defines the Field entity." class="local">\Drupal\field\Entity\FieldConfig</a> @group field
Namespace
Drupal\Tests\field\UnitCode
public function testGetType() {
// Ensure that FieldConfig::getType() is not delegated to
// FieldStorage.
$this->entityFieldManager
->expects($this->never())
->method('getFieldStorageDefinitions');
$this->fieldStorage
->expects($this->never())
->method('getType');
$field = new FieldConfig([
'field_name' => $this->fieldStorage
->getName(),
'entity_type' => 'test_entity_type',
'bundle' => 'test_bundle',
'field_type' => 'test_field',
], $this->entityTypeId);
$this->assertEquals('test_field', $field->getType());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.