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