function MigrationTest::testGetTrackLastImported

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetTrackLastImported()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetTrackLastImported()

Tests Migration::getTrackLastImported()

@covers ::getTrackLastImported @covers ::isTrackLastImported

File

core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php, line 178

Class

MigrationTest
Tests the migration plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testGetTrackLastImported() {
    $migration = \Drupal::service('plugin.manager.migration')->createStubMigration([]);
    $migration->setTrackLastImported(TRUE);
    $this->assertEquals(TRUE, $migration->getTrackLastImported());
    $this->assertEquals(TRUE, $migration->isTrackLastImported());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.