public function CommerceFieldNameTest::testCommerceFieldNameAddress in Commerce Migrate 3.1.x
Same name and namespace in other branches
- 8.2 modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceFieldNameTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceFieldNameTest::testCommerceFieldNameAddress()
- 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceFieldNameTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceFieldNameTest::testCommerceFieldNameAddress()
Tests CommerceFieldName plugin for address field input.
@dataProvider providerCommerceFieldNameAddress
File
- modules/
commerce/ tests/ src/ Unit/ Plugin/ migrate/ process/ commerce1/ CommerceFieldNameTest.php, line 117
Class
- CommerceFieldNameTest
- Tests the CommerceFieldName plugin.
Namespace
Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1Code
public function testCommerceFieldNameAddress($source_properties = NULL, $expected = NULL) {
$this->makeEntityUnique
->expects($this
->never())
->method('transform');
$this->row
->expects($this
->never())
->method('getDestinationProperty');
// Put the input values onto the Row.
$this->row
->method('getSourceProperty')
->will($this
->onConsecutiveCalls($source_properties[0], $source_properties[1], $source_properties[2], $source_properties[3]));
$value = $this->plugin
->transform('', $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame($expected, $value);
}