Drupal 8  8.0.2
MigrateSourceTest Class Reference
Inheritance diagram for MigrateSourceTest:

Public Member Functions

 testHighwaterTrackChangesIncompatible ()
 
 testCount ()
 
 testPrepareRowFalse ()
 
 testNextNeedsUpdate ()
 
 testOutdatedHighwater ()
 
 testNewHighwater ()
 
 testPrepareRow ()
 
 testPrepareRowGlobalPrepareSkip ()
 
 testPrepareRowMigratePrepareSkip ()
 
 testPrepareRowPrepareException ()
 
- Public Member Functions inherited from MigrateTestCase
 queryResultTest ($iter, $expected_results)
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 getSource ($configuration=[], $migrate_config=[], $status=MigrateIdMapInterface::STATUS_NEEDS_UPDATE)
 
- Protected Member Functions inherited from MigrateTestCase
 getMigration ()
 
 getDatabase (array $database_contents, $connection_options=[])
 
 createSchemaFromRow (array $row)
 
 getValue ($row, $key)
 
 retrievalAssertHelper ($expected_value, $actual_value, $message)
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $defaultMigrationConfiguration
 
 $row = ['test_sourceid1' => '1'
 
 $sourceIds = ['test_sourceid1' => 'test_sourceid1']
 
 $migration
 
 $executable
 
- Protected Attributes inherited from MigrateTestCase
 $migrationConfiguration = []
 
 $idMap
 
 $migrationStatus = MigrationInterface::STATUS_IDLE
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

migrate

Member Function Documentation

getSource (   $configuration = [],
  $migrate_config = [],
  $status = MigrateIdMapInterface::STATUS_NEEDS_UPDATE 
)
protected

Gets the source plugin to test.

Parameters
array$configuration(optional) The source configuration. Defaults to an empty array.
array$migrate_config(optional) The migration configuration to be used in parent::getMigration(). Defaults to an empty array.
int$status(optional) The default status for the new rows to be imported. Defaults to MigrateIdMapInterface::STATUS_NEEDS_UPDATE.
Returns
A mocked source plugin.

Referenced by MigrateSourceTest\testCount(), MigrateSourceTest\testHighwaterTrackChangesIncompatible(), MigrateSourceTest\testNewHighwater(), MigrateSourceTest\testNextNeedsUpdate(), MigrateSourceTest\testOutdatedHighwater(), and MigrateSourceTest\testPrepareRowFalse().

Here is the caller graph for this function:

testCount ( )

Test that the source count is correct.

::count

References MigrateSourceTest\getSource(), and Drupal\setContainer().

Here is the call graph for this function:

testHighwaterTrackChangesIncompatible ( )

::__construct

References MigrateSourceTest\getSource().

Here is the call graph for this function:

testNewHighwater ( )

Test that a highwater mark newer than our saved one imports a row.

Exceptions
\Exception

References MigrateSourceTest\getSource(), and MigrateIdMapInterface\STATUS_IMPORTED.

Here is the call graph for this function:

testNextNeedsUpdate ( )

Test that $row->needsUpdate() works as expected.

References MigrateSourceTest\getSource(), and MigrateIdMapInterface\STATUS_IMPORTED.

Here is the call graph for this function:

testOutdatedHighwater ( )

Test that an outdated highwater mark does not cause a row to be imported.

References MigrateSourceTest\getSource(), and MigrateIdMapInterface\STATUS_IMPORTED.

Here is the call graph for this function:

testPrepareRow ( )

Test basic row preparation.

::prepareRow

References MigrateTestCase\getMigration().

Here is the call graph for this function:

testPrepareRowFalse ( )

Test that we don't get a row if prepareRow() is false.

References MigrateSourceTest\getSource().

Here is the call graph for this function:

testPrepareRowGlobalPrepareSkip ( )

Test that global prepare hooks can skip rows.

::prepareRow

References MigrateTestCase\getMigration().

Here is the call graph for this function:

testPrepareRowMigratePrepareSkip ( )

Test that migrate specific prepare hooks can skip rows.

::prepareRow

References MigrateTestCase\getMigration().

Here is the call graph for this function:

testPrepareRowPrepareException ( )

Test that a skip exception during prepare hooks correctly skips.

::prepareRow

References MigrateTestCase\getMigration().

Here is the call graph for this function:

Field Documentation

$defaultMigrationConfiguration
protected
Initial value:
= [
'id' => 'test_migration'

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