You are here

public function OrderItemAdjustmentTest::testTransformInvalid in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Unit/Plugin/migrate/process/OrderItemAdjustmentTest.php \Drupal\Tests\ubercart\Unit\Plugin\migrate\process\ubercart\OrderItemAdjustmentTest::testTransformInvalid()
  2. 3.0.x modules/ubercart/tests/src/Unit/Plugin/migrate/process/OrderItemAdjustmentTest.php \Drupal\Tests\ubercart\Unit\Plugin\migrate\process\ubercart\OrderItemAdjustmentTest::testTransformInvalid()

Tests invalid input.

@dataProvider providerTestTransformInvalid

File

modules/ubercart/tests/src/Unit/Plugin/migrate/process/OrderItemAdjustmentTest.php, line 247

Class

OrderItemAdjustmentTest
Tests order item adjustment process plugin.

Namespace

Drupal\Tests\ubercart\Unit\Plugin\migrate\process\ubercart

Code

public function testTransformInvalid($value, $expected) {
  $row = $this
    ->prophesize(Row::class);
  $this->plugin = new OrderItemAdjustment([], 'map', [], $this->migration
    ->reveal(), $this->migrationPluginManager
    ->reveal(), $this->entityTypeManager
    ->reveal(), $this->rounder
    ->reveal());
  $result = $this->plugin
    ->transform($value, $this->migrateExecutable, $row
    ->reveal(), 'foo');
  $this
    ->assertEquals($expected, $result);
}