You are here

public function CommerceFieldNameTest::providerCommerceFieldNameOther in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceFieldNameTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceFieldNameTest::providerCommerceFieldNameOther()
  2. 3.1.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceFieldNameTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceFieldNameTest::providerCommerceFieldNameOther()

Data provider for testCommerceFieldNameOther().

File

modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceFieldNameTest.php, line 247

Class

CommerceFieldNameTest
Tests the CommerceFieldName plugin.

Namespace

Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1

Code

public function providerCommerceFieldNameOther() {
  $tests = [];

  // Tests address field name is changed.
  $field_name = 'field_image';
  $entity_type = 'node';
  $type = 'text';
  $instances = [
    [
      'data' => serialize([
        'widget' => [
          'type' => 'options_select',
        ],
      ]),
    ],
    [
      'data' => serialize([
        'widget' => [
          'type' => 'text',
        ],
      ]),
    ],
  ];
  $tests[0]['source_properties'] = [
    $field_name,
    $entity_type,
    $type,
    $instances,
  ];
  $tests[0]['expected'] = 'field_image';
  return $tests;
}