public function BaseFieldDefinitionTest::testFieldRevisionable in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest::testFieldRevisionable()
Tests field revisionable methods.
@covers ::isRevisionable @covers ::setRevisionable
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ BaseFieldDefinitionTest.php, line 267
Class
- BaseFieldDefinitionTest
- Unit test for BaseFieldDefinition.
Namespace
Drupal\Tests\Core\EntityCode
public function testFieldRevisionable() {
$definition = BaseFieldDefinition::create($this->fieldType);
$this
->assertFalse($definition
->isRevisionable());
$definition
->setRevisionable(TRUE);
$this
->assertTrue($definition
->isRevisionable());
$definition
->setRevisionable(FALSE);
$this
->assertFalse($definition
->isRevisionable());
}