public function CommerceMigrateTestTrait::assertStoreEntity 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::assertStoreEntity()
- 3.0.x tests/src/Kernel/CommerceMigrateTestTrait.php \Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait::assertStoreEntity()
Asserts a store entity.
Parameters
int $id: The store id.
string $name: The name of the store.
string $email: The email address of the store.
string $default_currency_code: The default currency code of the store.
string $bundle: The bundle.
string $owner_id: The owner id.
bool $default: The state of the store is_default property.
3 calls to CommerceMigrateTestTrait::assertStoreEntity()
- StoreTest::testStore in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ StoreTest.php - Test store migration.
- StoreTest::testStore in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc6/ StoreTest.php - Test store migration.
- StoreTest::testStore in modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ StoreTest.php - Test store migration from Drupal 7 to 8.
File
- tests/
src/ Kernel/ CommerceMigrateTestTrait.php, line 746
Class
- CommerceMigrateTestTrait
- Helper function to test migrations.
Namespace
Drupal\Tests\commerce_migrate\KernelCode
public function assertStoreEntity($id, $name, $email, $default_currency_code, $bundle, $owner_id, $default = NULL) {
$store = Store::load($id);
$this
->assertInstanceOf(Store::class, $store);
$this
->assertSame($name, $store
->getName());
$this
->assertSame($email, $store
->getEmail());
$this
->assertSame($default_currency_code, $store
->getDefaultCurrencyCode());
$this
->assertSame($bundle, $store
->bundle());
$this
->assertSame($owner_id, $store
->getOwnerId());
if ($default) {
$this
->assertSame($default, $store
->isDefault());
}
}