You are here

protected function CommerceKernelTestBase::setUp in Commerce Core 8.2

Overrides EntityKernelTestBase::setUp

28 calls to CommerceKernelTestBase::setUp()
ConfigUpdaterTest::setUp in tests/src/Kernel/ConfigUpdaterTest.php
ConfigurableFieldManagerTest::setUp in tests/src/Kernel/ConfigurableFieldManagerTest.php
CurrencyRepositoryTest::setUp in modules/price/tests/src/Kernel/CurrencyRepositoryTest.php
EntityUuidMapperTest::setUp in tests/src/Kernel/EntityUuidMapperTest.php
FormattedPriceTest::setUp in modules/price/tests/src/Kernel/FormattedPriceTest.php

... See full list

28 methods override CommerceKernelTestBase::setUp()
ConfigUpdaterTest::setUp in tests/src/Kernel/ConfigUpdaterTest.php
ConfigurableFieldManagerTest::setUp in tests/src/Kernel/ConfigurableFieldManagerTest.php
CurrencyRepositoryTest::setUp in modules/price/tests/src/Kernel/CurrencyRepositoryTest.php
EntityUuidMapperTest::setUp in tests/src/Kernel/EntityUuidMapperTest.php
FormattedPriceTest::setUp in modules/price/tests/src/Kernel/FormattedPriceTest.php

... See full list

File

tests/src/Kernel/CommerceKernelTestBase.php, line 52

Class

CommerceKernelTestBase
Provides a base class for Commerce kernel tests.

Namespace

Drupal\Tests\commerce\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->setErrorHandler();
  $factory = PhpUnitComparatorFactory::getInstance();
  $factory
    ->register(new NumberComparator());
  $factory
    ->register(new PriceComparator());
  $this
    ->installEntitySchema('path_alias');
  $this
    ->installEntitySchema('commerce_currency');
  $this
    ->installEntitySchema('commerce_store');
  $this
    ->installConfig([
    'commerce_store',
  ]);
  $currency_importer = $this->container
    ->get('commerce_price.currency_importer');
  $currency_importer
    ->import('USD');
  $this->store = $this
    ->createStore('Default store', 'admin@example.com');
}