function CallbackTest::testCallbackArray
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::testCallbackArray()
- 10 core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::testCallbackArray()
Test callback with valid "callable" and multiple arguments.
@dataProvider providerCallbackArray
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ CallbackTest.php, line 44
Class
- CallbackTest
- Tests the callback process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testCallbackArray($callable, $args, $result) : void {
$configuration = [
'callable' => $callable,
'unpack_source' => TRUE,
];
$this->plugin = new Callback($configuration, 'map', []);
$value = $this->plugin
->transform($args, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($result, $value);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.