class SqlIdMapTest
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php \Drupal\Tests\migrate\Kernel\Plugin\id_map\SqlIdMapTest
- 10 core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php \Drupal\Tests\migrate\Kernel\Plugin\id_map\SqlIdMapTest
Defines a test SQL ID map for use in tests.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\id_map\Sql extends \Drupal\migrate\Plugin\MigrateIdMapInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Audit\HighestIdInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Tests\migrate\Unit\TestSqlIdMap extends \Drupal\Tests\migrate\Unit\Iterator implements \Drupal\migrate\Plugin\migrate\id_map\Sql
- class \Drupal\Tests\migrate\Kernel\Plugin\id_map\SqlIdMapTest extends \Drupal\Tests\migrate\Kernel\Plugin\id_map\Iterator implements \Drupal\Tests\migrate\Unit\TestSqlIdMap
- class \Drupal\Tests\migrate\Unit\TestSqlIdMap extends \Drupal\Tests\migrate\Unit\Iterator implements \Drupal\migrate\Plugin\migrate\id_map\Sql
- class \Drupal\migrate\Plugin\migrate\id_map\Sql extends \Drupal\migrate\Plugin\MigrateIdMapInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Audit\HighestIdInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of SqlIdMapTest
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ Plugin/ id_map/ SqlTest.php, line 178
Namespace
Drupal\Tests\migrate\Kernel\Plugin\id_mapView source
class SqlIdMapTest extends TestSqlIdMap implements \Iterator {
/**
* {@inheritdoc}
*/
protected function getFieldSchema(array $id_definition) {
if (!isset($id_definition['type'])) {
return [];
}
switch ($id_definition['type']) {
case 'integer':
return [
'type' => 'int',
'not null' => TRUE,
];
case 'string':
return [
'type' => 'varchar',
'length' => 65536,
'not null' => FALSE,
];
default:
throw new MigrateException($id_definition['type'] . ' not supported');
}
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|---|
DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | |||
DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | |||
DependencySerializationTrait::__sleep | public | function | 3 | |||
DependencySerializationTrait::__wakeup | public | function | 3 | |||
MessengerTrait::$messenger | protected | property | The messenger. | 25 | ||
MessengerTrait::messenger | public | function | Gets the messenger. | 25 | ||
MessengerTrait::setMessenger | public | function | Sets the messenger. | |||
MigrateIdMapInterface::ROLLBACK_DELETE | constant | Indicates that the data for the row is to be deleted. | ||||
MigrateIdMapInterface::ROLLBACK_PRESERVE | constant | Indicates that the data for the row is to be preserved. | ||||
MigrateIdMapInterface::STATUS_FAILED | constant | Indicates that the import of the row failed. | ||||
MigrateIdMapInterface::STATUS_IGNORED | constant | Indicates that the import of the row was ignored. | ||||
MigrateIdMapInterface::STATUS_IMPORTED | constant | Indicates that the import of the row was successful. | ||||
MigrateIdMapInterface::STATUS_NEEDS_UPDATE | constant | Indicates that the row needs to be updated. | ||||
PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | 1 | ||
PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | 1 | ||
PluginBase::$pluginId | protected | property | The plugin ID. | |||
PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||||
PluginBase::getBaseId | public | function | Overrides DerivativeInspectionInterface::getBaseId | |||
PluginBase::getDerivativeId | public | function | Overrides DerivativeInspectionInterface::getDerivativeId | |||
PluginBase::getPluginDefinition | public | function | Overrides PluginInspectionInterface::getPluginDefinition | 2 | ||
PluginBase::getPluginId | public | function | Overrides PluginInspectionInterface::getPluginId | |||
PluginBase::isConfigurable | Deprecated | public | function | Determines if the plugin is configurable. | ||
Sql::$currentKey | protected | property | The current key. | |||
Sql::$currentRow | protected | property | The current row. | |||
Sql::$database | protected | property | The database connection for the map/message tables on the destination. | |||
Sql::$destinationIdFields | protected | property | The destination ID fields. | |||
Sql::$destinationIds | protected | property | The destination identifiers. | |||
Sql::$eventDispatcher | protected | property | An event dispatcher instance to use for map events. | |||
Sql::$initialized | protected | property | Whether the plugin is already initialized. | |||
Sql::$mapTableName | protected | property | The migration map table name. | |||
Sql::$messageTableName | protected | property | The message table name. | |||
Sql::$migration | protected | property | The migration being done. | |||
Sql::$migrationPluginManager | protected | property | The migration plugin manager. | |||
Sql::$query | protected | property | The select query. | |||
Sql::$result | protected | property | The result. | |||
Sql::$sourceIdFields | protected | property | The source ID fields. | |||
Sql::$sourceIds | protected | property | The source identifiers. | |||
Sql::clearMessages | public | function | Overrides MigrateIdMapInterface::clearMessages | |||
Sql::countHelper | protected | function | Counts records in a table. | |||
Sql::create | public static | function | Overrides ContainerFactoryPluginInterface::create | |||
Sql::current | public | function | Implementation of \Iterator::current(). | |||
Sql::currentDestination | public | function | Overrides MigrateIdMapInterface::currentDestination | |||
Sql::currentSource | public | function | Overrides MigrateIdMapInterface::currentSource | |||
Sql::delete | public | function | Overrides MigrateIdMapInterface::delete | |||
Sql::deleteDestination | public | function | Overrides MigrateIdMapInterface::deleteDestination | |||
Sql::destinationIdFields | protected | function | The destination ID fields. | |||
Sql::destroy | public | function | Overrides MigrateIdMapInterface::destroy | |||
Sql::errorCount | public | function | Overrides MigrateIdMapInterface::errorCount | |||
Sql::getDatabase | public | function | Gets the database connection. | |||
Sql::getHighestId | public | function | Overrides HighestIdInterface::getHighestId | |||
Sql::getMessages | public | function | Overrides MigrateIdMapInterface::getMessages | |||
Sql::getQualifiedMapTableName | public | function | Get the fully qualified map table name. | Overrides MigrateIdMapInterface::getQualifiedMapTableName | ||
Sql::getRowByDestination | public | function | Overrides MigrateIdMapInterface::getRowByDestination | |||
Sql::getRowBySource | public | function | Overrides MigrateIdMapInterface::getRowBySource | |||
Sql::getRowsNeedingUpdate | public | function | Overrides MigrateIdMapInterface::getRowsNeedingUpdate | |||
Sql::getSourceIdsHash | public | function | Retrieves the hash of the source identifier values. | |||
Sql::importedCount | public | function | Overrides MigrateIdMapInterface::importedCount | |||
Sql::init | protected | function | Initialize the plugin. | |||
Sql::key | public | function | Implementation of \Iterator::key(). | |||
Sql::lookupDestinationIds | public | function | Overrides MigrateIdMapInterface::lookupDestinationIds | |||
Sql::lookupSourceId | public | function | Overrides MigrateIdMapInterface::lookupSourceId | |||
Sql::mapTableName | public | function | The name of the database map table. | |||
Sql::messageCount | public | function | Overrides MigrateIdMapInterface::messageCount | |||
Sql::messageTableName | public | function | The name of the database message table. | |||
Sql::next | public | function | Implementation of \Iterator::next(). | |||
Sql::prepareUpdate | public | function | Overrides MigrateIdMapInterface::prepareUpdate | |||
Sql::processedCount | public | function | Overrides MigrateIdMapInterface::processedCount | |||
Sql::rewind | public | function | Implementation of \Iterator::rewind(). | |||
Sql::saveIdMapping | public | function | Overrides MigrateIdMapInterface::saveIdMapping | |||
Sql::saveMessage | public | function | Overrides MigrateIdMapInterface::saveMessage | |||
Sql::setMessage | public | function | Overrides MigrateIdMapInterface::setMessage | |||
Sql::setUpdate | public | function | Overrides MigrateIdMapInterface::setUpdate | |||
Sql::sourceIdFields | protected | function | The source ID fields. | |||
Sql::SOURCE_IDS_HASH | constant | Column name of hashed source id values. | ||||
Sql::updateCount | public | function | Overrides MigrateIdMapInterface::updateCount | |||
Sql::valid | public | function | Implementation of \Iterator::valid(). | |||
SqlIdMapTest::getFieldSchema | protected | function | Overrides TestSqlIdMap::getFieldSchema | |||
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | ||
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | |||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | |||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | |||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | ||
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | 1 | ||
TestSqlIdMap::$message | public | property | Overrides Sql::$message | |||
TestSqlIdMap::ensureTables | public | function | Overrides Sql::ensureTables | |||
TestSqlIdMap::__construct | public | function | Constructs a TestSqlIdMap object. | Overrides Sql::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.