You are here

public function DefaultValueTest::testDefaultValue in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php \Drupal\Tests\migrate\Unit\process\DefaultValueTest::testDefaultValue()

Tests the default_value process plugin.

@covers ::transform

@dataProvider defaultValueDataProvider

File

core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php, line 22

Class

DefaultValueTest
Tests the default_value process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testDefaultValue($configuration, $expected_value, $value) {
  $process = new DefaultValue($configuration, 'default_value', []);
  $value = $process
    ->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
  $this
    ->assertSame($expected_value, $value);
}