function ArrayBuildTest::testTransform
Tests successful transformation.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ ArrayBuildTest.php, line 31
Class
- ArrayBuildTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\ArrayBuild[[api-linebreak]] @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testTransform() : void {
$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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.