protected function CommerceMigrateTestTrait::assertProductAttributeEntity in Commerce Migrate 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertProductAttributeEntity()
- 3.0.x tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertProductAttributeEntity()
Asserts a product attribute entity.
Parameters
string $id: The attribute id.
string $label: The expected attribute label.
string $element_type: The expected element type of the attribute.
4 calls to CommerceMigrateTestTrait::assertProductAttributeEntity()
- ProductAttributeTest::testMigrateProductAttributeTest in modules/
magento/ tests/ src/ Kernel/ Migrate/ magento2/ ProductAttributeTest.php - Test attribute migration.
- ProductAttributeTest::testMigrateProductAttributeTest in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ ProductAttributeTest.php - Test attribute migration.
- ProductAttributeTest::testMigrateProductAttributeTest in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc6/ ProductAttributeTest.php - Test attribute migration.
- ProductAttributeTest::testMigrateProductAttributeTest in modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ ProductAttributeTest.php - Test attribute migration from Commerce 1.
File
- tests/
src/ Kernel/ CommerceMigrateTestTrait.php, line 446
Class
- CommerceMigrateTestTrait
- Helper function to test migrations.
Namespace
Drupal\Tests\commerce_migrate\KernelCode
protected function assertProductAttributeEntity($id, $label, $element_type) {
$attribute = ProductAttribute::load($id);
$this
->assertInstanceOf(ProductAttribute::class, $attribute);
$this
->assertSame($label, $attribute
->label());
$this
->assertSame($element_type, $attribute
->getElementType());
}