public function CommerceAttributeTargetTypeTest::testCommerceAttributeTargetType in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceAttributeTargetTypeTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceAttributeTargetTypeTest::testCommerceAttributeTargetType()
- 3.1.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceAttributeTargetTypeTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceAttributeTargetTypeTest::testCommerceAttributeTargetType()
Tests CommerceAttributeTargetType.
@dataProvider providerTestCommerceAttributeTargetType
File
- modules/
commerce/ tests/ src/ Unit/ Plugin/ migrate/ process/ commerce1/ CommerceAttributeTargetTypeTest.php, line 31
Class
- CommerceAttributeTargetTypeTest
- Tests the CommerceAttributeTargetType plugin.
Namespace
Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1Code
public function testCommerceAttributeTargetType($src = NULL, $dst = NULL, $expected = NULL) {
$this->row
->expects($this
->once())
->method('getDestinationProperty')
->willReturn($dst);
$this->row
->method('getSourceProperty')
->will($this
->onConsecutiveCalls($src[0], $src[1], $src[2]));
$value = $this->plugin
->transform('', $this->migrateExecutable, $this->row, $dst);
$this
->assertSame($expected, $value);
}