public function NullCoalesceTest::testTransform in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::testTransform()
Tests null_coalesce.
@covers ::transform
@dataProvider transformDataProvider
Parameters
array $source: The source value.
mixed $expected_result: The expected result.
Throws
\Drupal\migrate\MigrateException
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ NullCoalesceTest.php, line 41
Class
- NullCoalesceTest
- Tests the null_coalesce process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testTransform(array $source, $expected_result) {
$plugin = new NullCoalesce([], 'null_coalesce', []);
$result = $plugin
->transform($source, $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame($expected_result, $result);
}