Issue #2723123 by agoradesign, milesw: Last imported timestamps not set in map tables
parent
788d8077e0
commit
9bb1c3691c
|
@ -703,14 +703,14 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getTrackLastImported() {
|
public function getTrackLastImported() {
|
||||||
$this->trackLastImported;
|
return $this->trackLastImported;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getDestinationIds() {
|
public function getDestinationIds() {
|
||||||
$this->destinationIds;
|
return $this->destinationIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,29 @@ class MigrationTest extends KernelTestBase {
|
||||||
$this->assertNotEmpty($migration->getMigrationDependencies(), 'Migration dependencies is not empty');
|
$this->assertNotEmpty($migration->getMigrationDependencies(), 'Migration dependencies is not empty');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests Migration::getDestinationIds()
|
||||||
|
*
|
||||||
|
* @covers ::getDestinationIds
|
||||||
|
*/
|
||||||
|
public function testGetDestinationIds() {
|
||||||
|
$migration = \Drupal::service('plugin.manager.migration')->createStubMigration(['destinationIds' => ['foo' => 'bar']]);
|
||||||
|
$destination_ids = $migration->getDestinationIds();
|
||||||
|
$this->assertNotEmpty($destination_ids, 'Destination ids are not empty');
|
||||||
|
$this->assertEquals(['foo' => 'bar'], $destination_ids, 'Destination ids match the expected values.');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests Migration::getTrackLastImported()
|
||||||
|
*
|
||||||
|
* @covers ::getTrackLastImported
|
||||||
|
* @covers ::isTrackLastImported
|
||||||
|
*/
|
||||||
|
public function testGetTrackLastImported() {
|
||||||
|
$migration = \Drupal::service('plugin.manager.migration')->createStubMigration([]);
|
||||||
|
$migration->setTrackLastImported(TRUE);
|
||||||
|
$this->assertEquals(TRUE, $migration->getTrackLastImported());
|
||||||
|
$this->assertEquals(TRUE, $migration->isTrackLastImported());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue