protected function ExchangerProviderPluginTest::setUp in Commerce Exchanger 8
Overrides CommerceKernelTestBase::setUp
File
- tests/
src/ Kernel/ ExchangerProviderPluginTest.php, line 41
Class
- ExchangerProviderPluginTest
- @coversDefaultClass \Drupal\commerce_exchanger\Plugin\Commerce\ExchangerProvider\ExchangerProviderRemoteBase @group commerce_exchanger
Namespace
Drupal\Tests\commerce_exchanger\KernelCode
protected function setUp() {
parent::setUp();
$this
->installConfig([
'commerce_exchanger',
]);
// The parent has already imported USD.
$currency_importer = $this->container
->get('commerce_price.currency_importer');
$currency_importer
->import('HRK');
$currency_importer
->import('EUR');
$hnb_entity = ExchangeRates::create([
'id' => 'test',
'label' => 'Test',
'plugin' => 'test',
]);
$hnb_entity
->save();
$this->test = $hnb_entity
->getPlugin();
$fixer_entity = ExchangeRates::create([
'id' => 'enterprise',
'label' => 'Enterprise',
'plugin' => 'enterprise',
'configuration' => [
'enterprise' => TRUE,
],
]);
$fixer_entity
->save();
$this->enterprise = $fixer_entity
->getPlugin();
}