public function ArrayBuildTest::testTransform in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/process/ArrayBuildTest.php \Drupal\Tests\migrate\Unit\process\ArrayBuildTest::testTransform()
Tests successful transformation.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ ArrayBuildTest.php, line 29
Class
- ArrayBuildTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\ArrayBuild @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testTransform() {
$source = [
[
'foo' => 'Foo',
'bar' => 'Bar',
],
[
'foo' => 'foo bar',
'bar' => 'bar foo',
],
];
$expected = [
'Foo' => 'Bar',
'foo bar' => 'bar foo',
];
$value = $this->plugin
->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame($value, $expected);
}