public function CommerceAdjustmentsTest::testNotSet in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x tests/src/Kernel/Plugin/migrate/process/CommerceAdjustmentsTest.php \Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\process\CommerceAdjustmentsTest::testNotSet()
- 3.0.x tests/src/Kernel/Plugin/migrate/process/CommerceAdjustmentsTest.php \Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\process\CommerceAdjustmentsTest::testNotSet()
Tests required values not set.
@dataProvider providerNotSet
File
- tests/
src/ Kernel/ Plugin/ migrate/ process/ CommerceAdjustmentsTest.php, line 258
Class
- CommerceAdjustmentsTest
- Tests the CommerceAdjustment plugin.
Namespace
Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\processCode
public function testNotSet($value = NULL, $property = NULL) {
if (is_string($property)) {
$msg = sprintf("Property '%s' is not set for adjustment '%s'", $property, var_export($value, TRUE));
}
else {
$msg = sprintf("Properties 'amount' and 'currency_code' are not set for adjustment '%s'", var_export($value, TRUE));
}
$this
->expectException(MigrateSkipRowException::class);
$this
->expectExceptionMessage($msg);
$this->plugin
->transform([
$value,
], $this->migrateExecutable, $this->row, 'destination_property');
}