$this->storageSchema =
$this->
getMockBuilder('Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema'
) ->
setConstructorArgs([$this->entityTypeManager->
reveal(),
$this->entityType,
$this->storage,
$connection,
$this->entityFieldManager->
reveal(),
$this->entityLastInstalledSchemaRepository
]) ->
onlyMethods(['installedStorageSchema', 'hasSharedTableStructureChange'
]) ->
getMock();
$this->storageSchema->
expects($this->
any()) ->
method('hasSharedTableStructureChange'
) ->
with($updated_entity_type_definition,
$original_entity_type_definition) ->
willReturn($shared_table_structure_changed);
$this->
assertEquals($migration_required,
$this->storageSchema->
requiresEntityDataMigration($updated_entity_type_definition,
$original_entity_type_definition));
} /**
* Data provider for ::testRequiresEntityStorageSchemaChanges().
*/
public function providerTestRequiresEntityStorageSchemaChanges() { $cases =
[];
$updated_entity_type_definition =
$this->
createMock('\Drupal\Core\Entity\ContentEntityTypeInterface'
);
$original_entity_type_definition =
$this->
createMock('\Drupal\Core\Entity\ContentEntityTypeInterface'
);