function MigrateSqlIdMapTest::getIdMap
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::getIdMap()
- 10 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::getIdMap()
- 11.x core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::getIdMap()
Creates a test SQL ID map plugin.
Return value
\Drupal\Tests\migrate\Unit\TestSqlIdMap A SQL ID map plugin test instance.
21 calls to MigrateSqlIdMapTest::getIdMap()
- MigrateSqlIdMapTest::setupRows in core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php - Setup a database with the given rows.
- MigrateSqlIdMapTest::testClearMessages in core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php - Tests the clear messages method.
- MigrateSqlIdMapTest::testDestroy in core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php - Tests the destroy method.
- MigrateSqlIdMapTest::testGetHighestId in core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php - Tests getHighestId method.
- MigrateSqlIdMapTest::testGetHighestIdInvalid in core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php - Tests getHighestId method with invalid data.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ MigrateSqlIdMapTest.php, line 95
Class
- MigrateSqlIdMapTest
- Tests the SQL ID map plugin.
Namespace
Drupal\Tests\migrate\UnitCode
protected function getIdMap() {
$migration = $this->getMigration();
$plugin = $this->createMock('Drupal\\migrate\\Plugin\\MigrateSourceInterface');
$plugin->method('getIds')
->willReturn($this->sourceIds);
$migration->method('getSourcePlugin')
->willReturn($plugin);
$plugin = $this->createMock('Drupal\\migrate\\Plugin\\MigrateDestinationInterface');
$plugin->method('getIds')
->willReturn($this->destinationIds);
$migration->method('getDestinationPlugin')
->willReturn($plugin);
$event_dispatcher = $this->createMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$id_map = new TestSqlIdMap($this->database, [], 'sql', [], $migration, $event_dispatcher);
$migration->method('getIdMap')
->willReturn($id_map);
return $id_map;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.