Issue #2723123 by agoradesign, milesw: Last imported timestamps not set in map tables

8.2.x
Alex Pott 2016-06-18 14:37:45 +01:00
parent 788d8077e0
commit 9bb1c3691c
2 changed files with 27 additions and 2 deletions

View File

@ -703,14 +703,14 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
* {@inheritdoc}
*/
public function getTrackLastImported() {
$this->trackLastImported;
return $this->trackLastImported;
}
/**
* {@inheritdoc}
*/
public function getDestinationIds() {
$this->destinationIds;
return $this->destinationIds;
}
}

View File

@ -39,4 +39,29 @@ class MigrationTest extends KernelTestBase {
$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());
}
}