You are here

public function CommercePriceTest::testCommercePrice in Commerce Migrate 3.0.x

Same name in this branch
  1. 3.0.x modules/magento/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\CommercePriceTest::testCommercePrice()
  2. 3.0.x modules/csv_example/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\CommercePriceTest::testCommercePrice()
  3. 3.0.x modules/shopify/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_shopify\Unit\Plugin\migrate\process\CommercePriceTest::testCommercePrice()
  4. 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommercePriceTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommercePriceTest::testCommercePrice()
Same name and namespace in other branches
  1. 8.2 modules/magento/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\CommercePriceTest::testCommercePrice()
  2. 3.1.x modules/magento/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\CommercePriceTest::testCommercePrice()

Tests Commerce Price plugin.

@dataProvider providerTestCommercePrice

File

modules/magento/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php, line 22

Class

CommercePriceTest
Tests the Commerce Price plugin.

Namespace

Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process

Code

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