$this->assertEquals('The A new base field field needs to be updated.',strip_tags((string)$changes['entity_test_update'][0]));
$this->applyEntityUpdates();
$this->applyEntityUpdates('entity_test_update');
$this->assertFalse($this->database->schema()->fieldExists('entity_test_update','new_base_field'),'Original column deleted in shared table for new_base_field.');
$this->assertTrue($this->database->schema()->fieldExists('entity_test_update','new_base_field__value'),'Value column created in shared table for new_base_field.');
$this->assertTrue($this->database->schema()->fieldExists('entity_test_update','new_base_field__format'),'Format column created in shared table for new_base_field.');
@@ -266,7 +268,7 @@ public function testBaseFieldCreateUpdateDeleteWithoutData(): void {
$this->assertEquals('The A new base field field needs to be uninstalled.',strip_tags((string)$changes['entity_test_update'][0]));
$this->applyEntityUpdates();
$this->applyEntityUpdates('entity_test_update');
$this->assertFalse($this->database->schema()->fieldExists('entity_test_update','new_base_field_value'),'Value column deleted from shared table for new_base_field.');
$this->assertFalse($this->database->schema()->fieldExists('entity_test_update','new_base_field_format'),'Format column deleted from shared table for new_base_field.');
}
@@ -283,7 +285,7 @@ public function testBaseFieldWithoutLabelCreateUpdateDelete(): void {
$this->assertTrue($assert,'Columns created in shared table for new_base_field.');
@@ -346,11 +348,11 @@ public function testBaseFieldCreateDeleteWithExistingEntities(): void {
// definitions. See https://www.drupal.org/node/2390495.
$entity->delete();
$this->removeBaseField();
$this->applyEntityUpdates();
$this->applyEntityUpdates('entity_test_update');
$this->assertFalse($schema_handler->fieldExists('entity_test_update','new_base_field__shape'),'Shape column should be removed from the shared table for new_base_field.');
$this->assertFalse($schema_handler->fieldExists('entity_test_update','new_base_field__color'),'Color column should be removed from the shared table for new_base_field.');
$this->assertTrue($this->database->schema()->fieldExists('entity_test_update','new_base_field'),"New field 'new_base_field' has been created on the 'entity_test_update' table.");
$this->assertTrue($this->database->schema()->indexExists('entity_test_update','entity_test_update_field__new_base_field'),"New index 'entity_test_update_field__new_base_field' has been created on the 'entity_test_update' table.");
// Check index size in for MySQL.
@@ -583,7 +581,7 @@ public function testCreateIndexUsingEntityStorageSchemaWithData(): void {
$this->assertFalse($this->entityDefinitionUpdateManager->needsUpdates(),'Entity and field schema data are correctly detected.');
$this->assertArrayNotHasKey('entity_test_update',$this->entityDefinitionUpdateManager->getChangeList(),'Entity and field schema data are correctly detected.');
}
/**
@@ -674,6 +672,7 @@ public function testInitialValue(): void {
* Tests entity type and field storage definition events.