You are here

protected function CommerceMigrateBaseTestCase::getProductsCsvItem in Commerce Migrate 7

Returns raw data of a product from CSV file.

Parameters

string $sku: Product SKU. See "products.csv".

Return value

\stdClass Raw data of a product from CSV file.

2 calls to CommerceMigrateBaseTestCase::getProductsCsvItem()
CommerceMigrateTestCase::testOrder in tests/commerce_migrate_tests.test
Tests integrity of an order.
CommerceMigrateTestCase::testProduct in tests/commerce_migrate_tests.test
Tests integrity of a product.

File

tests/commerce_migrate_base.test, line 157
Base facade for "Commerce Migrate" tests.

Class

CommerceMigrateBaseTestCase
Class CommerceMigrateBaseTestCase.

Code

protected function getProductsCsvItem($sku) {
  $item = $this
    ->readCsv('CommerceMigrateExampleProductsCsv', $sku);
  if (empty($item->currency_code)) {
    $item->currency_code = commerce_default_currency();
  }
  return $item;
}