public function DateRecurOccurrenceTableSchemaTest::testRevisionableOccurrenceTableSchema in Recurring Dates Field 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/DateRecurOccurrenceTableSchemaTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableSchemaTest::testRevisionableOccurrenceTableSchema()
- 3.0.x tests/src/Kernel/DateRecurOccurrenceTableSchemaTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableSchemaTest::testRevisionableOccurrenceTableSchema()
- 3.1.x tests/src/Kernel/DateRecurOccurrenceTableSchemaTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableSchemaTest::testRevisionableOccurrenceTableSchema()
Tests occurrence table schema for revisionable entities.
File
- tests/
src/ Kernel/ DateRecurOccurrenceTableSchemaTest.php, line 65
Class
- DateRecurOccurrenceTableSchemaTest
- Tests occurrence tables schema.
Namespace
Drupal\Tests\date_recur\KernelCode
public function testRevisionableOccurrenceTableSchema() {
$testEntityType = 'dr_entity_test_rev';
$this
->installEntitySchema($testEntityType);
// Check again this entity type is not revisionable.
$definition = \Drupal::entityTypeManager()
->getDefinition($testEntityType);
$this
->assertTrue($definition
->isRevisionable());
$definitions = \Drupal::service('entity_field.manager')
->getFieldStorageDefinitions($testEntityType);
$tableName = DateRecurOccurrences::getOccurrenceCacheStorageTableName($definitions[$this->fieldName]);
$schema = \Drupal::database()
->schema();
$this
->assertTrue($schema
->fieldExists($tableName, 'revision_id'));
}