You are here

public function CommerceMigrateTestTrait::assertAddressField in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertAddressField()
  2. 3.1.x tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertAddressField()

Asserts an address field.

Parameters

array $address: The address id.

string $country_code: The country code.

string $administrative_area: The administrative area.

string $locality: The locality.

string $dependent_locality: The dependent locality.

string $postal_code: The postal code.

string $sorting_code: The sorting code.

string $address_line_1: Address line 1.

string $address_line_2: Address line 2.

string $given_name: The given name.

string $additional_name: Any additional names.

string $family_name: The family name.

string $organization: The organization string.

7 calls to CommerceMigrateTestTrait::assertAddressField()
ProfileBillingDeletedUserTest::testProfileBilling in modules/ubercart/tests/src/Kernel/Migrate/uc7/ProfileBillingDeletedUserTest.php
Test profile migration.
ProfileBillingDeletedUserTest::testProfileBilling in modules/ubercart/tests/src/Kernel/Migrate/uc6/ProfileBillingDeletedUserTest.php
Test profile migration.
ProfileBillingTest::testProfileBilling in modules/ubercart/tests/src/Kernel/Migrate/uc7/ProfileBillingTest.php
Test profile migration.
ProfileBillingTest::testProfileBilling in modules/ubercart/tests/src/Kernel/Migrate/uc6/ProfileBillingTest.php
Test profile migration.
ProfileCustomerTest::testCustomerProfile in modules/magento/tests/src/Kernel/Migrate/magento2/ProfileCustomerTest.php
Test profile migration.

... See full list

File

tests/src/Kernel/CommerceMigrateTestTrait.php, line 65

Class

CommerceMigrateTestTrait
Helper function to test migrations.

Namespace

Drupal\Tests\commerce_migrate\Kernel

Code

public function assertAddressField(array $address, $country_code, $administrative_area, $locality, $dependent_locality, $postal_code, $sorting_code, $address_line_1, $address_line_2, $given_name, $additional_name, $family_name, $organization) {
  $this
    ->assertSame($country_code, $address['country_code']);
  $this
    ->assertSame($administrative_area, $address['administrative_area']);
  $this
    ->assertSame($locality, $address['locality']);
  $this
    ->assertSame($dependent_locality, $address['dependent_locality']);
  $this
    ->assertSame($postal_code, $address['postal_code']);
  $this
    ->assertSame($sorting_code, $address['sorting_code']);
  $this
    ->assertSame($address_line_1, $address['address_line1']);
  $this
    ->assertSame($address_line_2, $address['address_line2']);
  $this
    ->assertSame($given_name, $address['given_name']);
  $this
    ->assertSame($additional_name, $address['additional_name']);
  $this
    ->assertSame($family_name, $address['family_name']);
  $this
    ->assertSame($organization, $address['organization']);
}