Drupal 8  8.0.2
TestSqlBase Class Reference
Inheritance diagram for TestSqlBase:

Public Member Functions

 __construct ()
 
 setDatabase ($database)
 
 getDatabase ()
 
 setMigration ($migration)
 
 mapJoinable ()
 
 getIds ()
 
 setIds ($ids)
 
 fields ()
 
 query ()
 
 calculateDependencies ()
 
- Public Member Functions inherited from SqlBase
 __construct (array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state)
 
 __toString ()
 
 getDatabase ()
 
 query ()
 
 count ()
 
- Public Member Functions inherited from SourcePluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration)
 
 prepareRow (Row $row)
 
 current ()
 
 key ()
 
 valid ()
 
 rewind ()
 
 next ()
 
 getCurrentIds ()
 
 count ($refresh=FALSE)
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Protected Attributes

 $database
 
 $ids
 
- Protected Attributes inherited from SqlBase
 $query
 
 $database
 
 $state
 
- Protected Attributes inherited from SourcePluginBase
 $moduleHandler
 
 $migration
 
 $highWaterProperty
 
 $currentRow
 
 $currentSourceIds
 
 $originalHighWater
 
 $cacheCounts = FALSE
 
 $cacheKey
 
 $skipCount = FALSE
 
 $trackChanges = FALSE
 
 $mapRowAdded = FALSE
 
 $cache
 
 $idMap
 
 $iterator
 

Additional Inherited Members

- Static Public Member Functions inherited from SqlBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration=NULL)
 
- Static Public Member Functions inherited from ContainerFactoryPluginInterface
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Protected Member Functions inherited from SqlBase
 setUpDatabase (array $database_info)
 
 select ($table, $alias=NULL, array $options=array())
 
 prepareQuery ()
 
 initializeIterator ()
 
 mapJoinable ()
 
- Protected Member Functions inherited from SourcePluginBase
 initializeIterator ()
 
 getModuleHandler ()
 
 getIterator ()
 
 aboveHighwater (Row $row)
 
 rowChanged (Row $row)
 
 getCache ()
 

Detailed Description

Creates a base source class for SQL migration testing.

Constructor & Destructor Documentation

__construct ( )

Override the constructor so we can create one easily.

Member Function Documentation

calculateDependencies ( )

{}

fields ( )

{Returns available fields on the source.

Returns
array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.
}

Implements MigrateSourceInterface.

getDatabase ( )

{}

getIds ( )

{Defines the source fields uniquely identifying a source row.None of these fields should contain a NULL value. If necessary, use prepareRow() or hook_migrate_prepare_row() to rewrite NULL values to appropriate empty values (such as '' or 0).

Returns
array Array keyed by source field name, with values being a schema array describing the field (such as ['type' => 'string]).
}

Implements MigrateSourceInterface.

mapJoinable ( )

{}

query ( )

{}

setDatabase (   $database)

Allows us to set the database during tests.

Parameters
mixed$databaseThe database mock object.

References Drupal\database().

Here is the call graph for this function:

setIds (   $ids)

Allows us to set the IDs during a test.

Parameters
array$idsAn array of identifiers.
setMigration (   $migration)

Allows us to set the migration during the test.

Parameters
mixed$migrationThe migration mock.

The documentation for this class was generated from the following file: