You are here

protected function CommerceMigrateBaseTestCase::getStoreAdmin in Commerce Migrate 7

Get user object of a store administrator.

Return value

\stdClass Drupal user.

File

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

Class

CommerceMigrateBaseTestCase
Class CommerceMigrateBaseTestCase.

Code

protected function getStoreAdmin() {
  if (NULL === $this->storeAdmin) {
    $this->storeAdmin = $this
      ->createStoreAdmin();
    if (FALSE === $this->storeAdmin) {
      $this
        ->fail('Failed to create Store Admin user for test.');
    }
  }
  return $this->storeAdmin;
}