public function CommerceMigrateTestTrait::assertProfileEntity 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::assertProfileEntity()
- 3.0.x tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertProfileEntity()
Asserts a profile.
Parameters
int $profile: The profile entity.
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::assertProfileEntity()
- CommerceMigrateTestTrait::assertProfile in tests/
src/ Kernel/ CommerceMigrateTestTrait.php - Asserts a profile entity.
- CommerceMigrateTestTrait::assertProfileRevision in tests/
src/ Kernel/ CommerceMigrateTestTrait.php - Asserts a profile revision.
File
- tests/
src/ Kernel/ CommerceMigrateTestTrait.php, line 643
Class
- CommerceMigrateTestTrait
- Helper function to test migrations.
Namespace
Drupal\Tests\commerce_migrate\KernelCode
public function assertProfileEntity($profile, $type, $owner_id, $langcode, $is_active, $is_default, $created_time, $changed_time) {
$this
->assertInstanceOf(Profile::class, $profile);
$this
->assertSame($type, $profile
->bundle());
$this
->assertSame($owner_id, $profile
->getOwnerId());
$this
->assertSame($langcode, $profile
->language()
->getId());
$this
->assertSame($is_active, $profile
->isPublished());
$this
->assertSame($is_default, $profile
->isDefault());
if ($created_time != NULL) {
$this
->assertSame($created_time, $profile
->getCreatedTime());
}
if ($changed_time != NULL) {
$this
->assertSame($changed_time, $profile
->getChangedTime());
}
}