function BaseFieldDefinitionTest::testFieldType

Tests field type methods.

@covers ::getType

File

core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php, line 114

Class

BaseFieldDefinitionTest
Unit test for BaseFieldDefinition.

Namespace

Drupal\Tests\Core\Entity

Code

public function testFieldType() {
  $definition = BaseFieldDefinition::create($this->fieldType);
  $this->assertEquals($this->fieldType, $definition->getType());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.