public function NullCoalesceTest::transformWithDefaultProvider in Drupal 10
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::transformWithDefaultProvider()
Provides Data for ::testTransformWithDefault.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ NullCoalesceTest.php, line 104
Class
- NullCoalesceTest
- Tests the null_coalesce process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function transformWithDefaultProvider() {
return [
'default not used' => [
'source' => [
NULL,
NULL,
'Test',
'Test 2',
],
'default_value' => 'default',
'expected_result' => 'Test',
],
'default string' => [
'source' => [
NULL,
NULL,
],
'default_value' => 'default',
'expected_result' => 'default',
],
'default NULL' => [
'source' => [
NULL,
NULL,
],
'default_value' => NULL,
'expected_result' => NULL,
],
];
}