public function MediaWysiwygPluginBaseTest::providerTestProcess in Media Migration 8
Data provider for ::testProcess.
Return value
array The test cases.
File
- tests/
src/ Unit/ MediaWysiwygPluginBaseTest.php, line 157
Class
- MediaWysiwygPluginBaseTest
- Tests the Bean Media WYSIWYG plugin.
Namespace
Drupal\Tests\media_migration\UnitCode
public function providerTestProcess() {
return [
'No matching migrations' => [
'Field row values' => [
'field_name' => 'field',
'entity_type' => 'source_entity_type',
],
'Additional migrations' => [],
'Expected extra migrations' => [],
],
'With a matching migration' => [
'Field row values' => [
'field_name' => 'field',
'entity_type' => 'source_entity_type',
],
'Additional migrations' => [
'source_entity_type_migration' => [
'migration_tags' => [
'Drupal 7',
'Content',
],
'process' => [
'field' => 'an_another_field',
'destination_field' => 'field',
],
'destination' => [
'plugin' => 'entity:dest_entity_type',
],
],
],
'Expected extra migrations' => [
'source_entity_type_migration' => [
'migration_tags' => [
'Drupal 7',
'Content',
],
'process' => [
'field' => 'an_another_field',
'destination_field' => [
[
'plugin' => 'get',
'source' => 'field',
],
[
'plugin' => 'media_wysiwyg_filter',
],
],
],
'destination' => [
'plugin' => 'entity:dest_entity_type',
],
],
],
],
];
}