You are here

public function CurrentCurrencyTest::testDefault in Commerce Currency Resolver 8

Test current currency.

@covers ::getCurrency

File

tests/src/Kernel/CurrentCurrencyTest.php, line 104

Class

CurrentCurrencyTest
Tests current currency class.

Namespace

Drupal\Tests\commerce_currency_resolver\Kernel

Code

public function testDefault() {
  $this
    ->assertInstanceOf(StoreInterface::class, $this->store);
  $this
    ->assertEqual($this->store
    ->getDefaultCurrencyCode(), $this->currentCurrency
    ->getCurrency());
  $this
    ->assertEqual('USD', $this->store
    ->getDefaultCurrencyCode());
  $this
    ->assertEqual('USD', $this->currentCurrency
    ->getCurrency());
  $this
    ->assertEqual('HRK', $this
    ->config('commerce_currency_resolver.settings')
    ->get('currency_default'));
}