public function BaseFieldDefinitionTest::testCustomStorage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 281 - Contains \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest.
Class
- BaseFieldDefinitionTest
- Unit test for BaseFieldDefinition.
Namespace
Drupal\Tests\Core\EntityCode
public function testCustomStorage() {
$definition = BaseFieldDefinition::create($this->fieldType);
$this
->assertFalse($definition
->hasCustomStorage());
$definition
->setCustomStorage(TRUE);
$this
->assertTrue($definition
->hasCustomStorage());
$definition
->setCustomStorage(FALSE);
$this
->assertFalse($definition
->hasCustomStorage());
}