class GetTest extends MigrateProcessTestCase
{ /**
* Tests the Get plugin when source is a string.
*/
public function testTransformSourceString() { $this->row->
expects($this->
once()) ->
method('get'
) ->
with('test'
) ->
willReturn('source_value'
);
$this->plugin =
new Get(['source' => 'test'
], '',
[]);
$value =
$this->plugin->
transform(NULL,
$this->migrateExecutable,
$this->row, 'destination_property'
);
$this->
assertSame('source_value',
$value);
} /**
* Tests the Get plugin when source is an array.
*/
public function testTransformSourceArray() { $map =
[ 'test1' => 'source_value1',
'test2' => 'source_value2',
];