->
execute() ->
fetchAll(\PDO::FETCH_ASSOC
);
$this->
assertSameSize($expected,
$result);
// Use assertEquals and not assertSame here to prevent that a different
// sequence of the columns in the table will affect the check.
$this->
assertEquals($expected,
$result);
} // Check that the field storage definition is marked for purging.
$deleted_storage_definitions = \Drupal::
service('entity_field.deleted_fields_repository'
)->
getFieldStorageDefinitions();
$this->
assertArrayHasKey($storage_definition->
getUniqueStorageIdentifier(),
$deleted_storage_definitions, 'The base field is marked for purging.'
);
// Purge field data, and check that the storage definition has been
// completely removed once the data is purged.
field_purge_batch(10
);
$deleted_storage_definitions = \Drupal::
service('entity_field.deleted_fields_repository'
)->
getFieldStorageDefinitions();
$this->
assertEmpty($deleted_storage_definitions, 'The base field has been deleted.'
);
$this->
assertFalse($schema_handler->
tableExists($dedicated_deleted_table_name), 'A dedicated field table was deleted after new_base_field was purged.'
);
if (isset($dedicated_deleted_revision_table_name)) { $this->
assertFalse($schema_handler->
tableExists($dedicated_deleted_revision_table_name), 'A dedicated field revision table was deleted after new_base_field was purged.'
);
} }