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