You are here

public function SkipShippingDefaultTest::testInvalidType in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/magento/tests/src/Unit/Plugin/migrate/process/SkipShippingDefaultTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\SkipShippingDefaultTest::testInvalidType()
  2. 3.1.x modules/magento/tests/src/Unit/Plugin/migrate/process/SkipShippingDefaultTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\SkipShippingDefaultTest::testInvalidType()

Tests that exception is thrown when input is not an array.

@dataProvider providerTestInvalidType

File

modules/magento/tests/src/Unit/Plugin/migrate/process/SkipShippingDefaultTest.php, line 76

Class

SkipShippingDefaultTest
Tests the skip default shipping row process plugin.

Namespace

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

Code

public function testInvalidType($value = NULL) {
  $configuration = [];
  $this->plugin = new CommercePrice($configuration, 'map', []);
  $type = gettype($value);
  $this
    ->expectExceptionMessage(sprintf("Input should be an array, instead it was of type '%s'", $type));
  $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'foo');
}