diff -u b/tests/src/Kernel/CommerceMigrateTestTrait.php b/tests/src/Kernel/CommerceMigrateTestTrait.php --- b/tests/src/Kernel/CommerceMigrateTestTrait.php +++ b/tests/src/Kernel/CommerceMigrateTestTrait.php @@ -107,10 +107,10 @@ * The numeric code for the currency. * @param string $fraction_digits * The number of fraction digits for this currency. - * @param string $currency_symbol + * @param string $symbol * The currency symbol. */ - public function assertCurrencyEntity($id, $currency_code, $name, $numeric_code, $fraction_digits, $currency_symbol) { + public function assertCurrencyEntity($id, $currency_code, $name, $numeric_code, $fraction_digits, $symbol) { /** @var \Drupal\commerce_price\Entity\CurrencyInterface $currency */ $currency = Currency::load($id); $this->assertInstanceOf(CurrencyInterface::class, $currency); @@ -118,7 +118,7 @@ $this->assertSame($name, $currency->getName()); $this->assertSame($fraction_digits, $currency->getFractionDigits()); $this->assertSame($numeric_code, $currency->getNumericCode()); - $this->assertSame($currency_symbol, $currency->getSymbol()); + $this->assertSame($symbol, $currency->getSymbol()); } public function assertDefaultStore() { @@ -205,17 +205,17 @@ * * @param string $id * The attribute id. - * @param string $expected_label + * @param string $label * The expected attribute label. - * @param string $expected_element_type + * @param string $element_type * The expected element type of the attribute. */ - protected function assertProductAttributeEntity($id, $expected_label, $expected_element_type) { - list ($expected_entity_type, $expected_name) = explode('.', $id); - $attribute = ProductAttribute::load($expected_name); + protected function assertProductAttributeEntity($id, $label, $element_type) { + list ($entity_type, $name) = explode('.', $id); + $attribute = ProductAttribute::load($name); $this->assertTrue($attribute instanceof ProductAttribute); - $this->assertSame($expected_label, $attribute->label()); - $this->assertSame($expected_element_type, $attribute->getElementType()); + $this->assertSame($label, $attribute->label()); + $this->assertSame($element_type, $attribute->getElementType()); } /** @@ -223,22 +223,22 @@ * * @param string $id * The attribute value id. - * @param string $expected_attribute_id + * @param string $attribute_id * The expected product attribute value id. - * @param string $expected_name + * @param string $name * The expected name of the product attribute value. - * @param string $expected_label + * @param string $label * The expected label of the product attribute value. - * @param string $expected_weight + * @param string $weight * The expected weight of the product attribute value. */ - protected function assertProductAttributeValueEntity($id, $expected_attribute_id, $expected_name, $expected_label, $expected_weight) { + protected function assertProductAttributeValueEntity($id, $attribute_id, $name, $label, $weight) { $attribute_value = ProductAttributeValue::load($id); $this->assertTrue($attribute_value instanceof ProductAttributeValue); - $this->assertSame($expected_attribute_id, $attribute_value->getAttributeId()); - $this->assertSame($expected_name, $attribute_value->getName()); - $this->assertSame($expected_label, $attribute_value->label()); - $this->assertSame($expected_weight, $attribute_value->getWeight()); + $this->assertSame($attribute_id, $attribute_value->getAttributeId()); + $this->assertSame($name, $attribute_value->getName()); + $this->assertSame($label, $attribute_value->label()); + $this->assertSame($weight, $attribute_value->getWeight()); } /** @@ -345,20 +345,20 @@ * The name of the store. * @param string $email * The email address of the store. - * @param string $default_currency + * @param string $default_currency_code * The default currency code of the store. * @param string $bundle * The bundle. * @param string $owner_id * The owner id. */ - public function assertStoreEntity($id, $name, $email, $default_currency, $bundle, $owner_id) { + public function assertStoreEntity($id, $name, $email, $default_currency_code, $bundle, $owner_id) { $store = Store::load($id); $this->assertNotNull($store); $this->assertInstanceOf(Store::class, $store); $this->assertSame($name, $store->getName()); $this->assertSame($email, $store->getEmail()); - $this->assertSame($default_currency, $store->getDefaultCurrencyCode()); + $this->assertSame($default_currency_code, $store->getDefaultCurrencyCode()); $this->assertSame($bundle, $store->bundle()); $this->assertSame($owner_id, $store->getOwnerId()); }