You are here

public function CommerceAttributeHandlerSettingTest::testException 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/CommerceAttributeHandlerSettingTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceAttributeHandlerSettingTest::testException()
  2. 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceAttributeHandlerSettingTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceAttributeHandlerSettingTest::testException()

Tests invalid cases.

@dataProvider providerTestException

File

modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceAttributeHandlerSettingTest.php, line 76

Class

CommerceAttributeHandlerSettingTest
Tests the CommerceAttributeTargetType plugin.

Namespace

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

Code

public function testException($src = NULL) {
  $this->row
    ->method('getSourceProperty')
    ->will($this
    ->onConsecutiveCalls($src[0], $src[1], $src[2], $src[3]));
  $this
    ->expectException(MigrateSkipProcessException::class);
  $this->plugin
    ->transform([], $this->migrateExecutable, $this->row, 'property');
}