You are here

public function MigrationTest::testGetTrackLastImported in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetTrackLastImported()
  2. 9 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());
}