You are here

public function CommerceMigrateTestTrait::assertProfileRevision in Commerce Migrate 3.1.x

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

Asserts a profile revision.

Parameters

int $id: The profile id.

string $type: The profile type.

int $owner_id: The uid for this billing profile.

string $langcode: The profile language code.

string $is_active: The active state of the profile.

bool $is_default: True if this this the default profile.

string $created_time: The time the profile was created..

string $changed_time: The time the profile was last changed.

2 calls to CommerceMigrateTestTrait::assertProfileRevision()
ProfileCustomerTest::testCustomerProfile in modules/magento/tests/src/Kernel/Migrate/magento2/ProfileCustomerTest.php
Test profile migration.
ProfileTest::testProfile in modules/commerce/tests/src/Kernel/Migrate/commerce1/ProfileTest.php
Test profile migration from Drupal 7 Commerce to Drupal 8.

File

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

Class

CommerceMigrateTestTrait
Helper function to test migrations.

Namespace

Drupal\Tests\commerce_migrate\Kernel

Code

public function assertProfileRevision($id, $type, $owner_id, $langcode, $is_active, $is_default, $created_time, $changed_time) {
  $revision = \Drupal::entityTypeManager()
    ->getStorage('profile')
    ->loadRevision($id);
  $this
    ->assertProfileEntity($revision, $type, $owner_id, $langcode, $is_active, $is_default, $created_time, $changed_time);
}