You are here

public function FormatDateTest::testTransform in Drupal 8

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

Tests transformation.

@covers ::transform

@dataProvider datesDataProvider

Parameters

$configuration: The configuration of the migration process plugin.

$value: The source value for the migration process plugin.

$expected: The expected value of the migration process plugin.

File

core/modules/migrate/tests/src/Unit/process/FormatDateTest.php, line 125

Class

FormatDateTest
Tests the format date process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testTransform($configuration, $value, $expected) {
  $this->plugin = new FormatDate($configuration, 'test_format_date', []);
  $actual = $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'field_date');
  $this
    ->assertEquals($expected, $actual);
}