You are here

public function MigrateSourceTest::testDefaultPropertiesValues in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\MigrateSourceTest::testDefaultPropertiesValues()

Tests that cacheCounts, skipCount, trackChanges preserve their default values.

File

core/modules/migrate/tests/src/Unit/MigrateSourceTest.php, line 427
Contains \Drupal\Tests\migrate\Unit\MigrateSourceTest.

Class

MigrateSourceTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

public function testDefaultPropertiesValues() {
  $this->migrationConfiguration['id'] = 'test_migration';
  $migration = $this
    ->getMigration();
  $source = new StubSourceGeneratorPlugin([], '', [], $migration);

  // Test the default value of the skipCount Value;
  $this
    ->assertTrue($source
    ->getSkipCount());
  $this
    ->assertTrue($source
    ->getCacheCounts());
  $this
    ->assertTrue($source
    ->getTrackChanges());
}