function BaseFieldDefinitionTest::testCustomStorage
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest::testCustomStorage()
- 8.9.x core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest::testCustomStorage()
- 11.x core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest::testCustomStorage()
Tests custom storage.
@covers ::hasCustomStorage @covers ::setCustomStorage
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ BaseFieldDefinitionTest.php, line 346
Class
- BaseFieldDefinitionTest
- Unit test for BaseFieldDefinition.
Namespace
Drupal\Tests\Core\EntityCode
public function testCustomStorage() : void {
$definition = BaseFieldDefinition::create($this->fieldType);
$this->assertFalse($definition->hasCustomStorage());
$definition->setCustomStorage(TRUE);
$this->assertTrue($definition->hasCustomStorage());
$definition->setCustomStorage(FALSE);
$this->assertFalse($definition->hasCustomStorage());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.