public function ExtractTest::testExtractDefault in Drupal 9
Test the extract plugin with default values.
@dataProvider providerExtractDefault
Parameters
array $value: The process plugin input value.
array $configuration: The plugin configuration.
string|null $expected: The expected transformed value.
Throws
\Drupal\migrate\MigrateException
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ ExtractTest.php, line 75
Class
- ExtractTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExtractDefault(array $value, array $configuration, $expected) {
$this->plugin = new Extract($configuration, 'map', []);
$value = $this->plugin
->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame($expected, $value);
}