You are here

public function CommerceRefreshModeTest::testCommercePrice in Commerce Migrate 8.2

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

Tests CommerceRefreshMode plugin based on providerTestSubstr() values.

@dataProvider providerTestCommercePrice

File

modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceRefreshModeTest.php, line 22

Class

CommerceRefreshModeTest
Tests the CommerceRefreshMode plugin.

Namespace

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

Code

public function testCommercePrice($value = NULL, $expected = NULL) {
  $configuration = [];
  $this->plugin = new CommerceRefreshMode($configuration, 'map', []);
  $value = $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
  $this
    ->assertSame($expected, $value);
}