public function AttributeDestinationTest::testInvalidValue in Commerce Migrate 3.1.x
Same name and namespace in other branches
- 8.2 modules/csv_example/tests/src/Unit/Plugin/migrate/process/AttributeDestinationTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\AttributeDestinationTest::testInvalidValue()
- 3.0.x modules/csv_example/tests/src/Unit/Plugin/migrate/process/AttributeDestinationTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\AttributeDestinationTest::testInvalidValue()
Tests that exception is thrown when input is not valid.
@dataProvider providerTestInvalidValue
File
- modules/
csv_example/ tests/ src/ Unit/ Plugin/ migrate/ process/ AttributeDestinationTest.php, line 60
Class
- AttributeDestinationTest
- Tests the Attribute Destination process plugin.
Namespace
Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\processCode
public function testInvalidValue($value = NULL) {
$this
->expectException(MigrateException::class);
$this
->expectExceptionMessage("There must be an even number of input values.");
$this->plugin = new AttributeDestination([], 'test_format_date', []);
$this->plugin
->transform($value, $this->migrateExecutable, $this->row, 'foo');
}