public function CurrentCurrencyTest::testNoStore in Commerce Currency Resolver 8
Tests current currency with no store.
@covers ::getCurrency
File
- tests/
src/ Kernel/ CurrentCurrencyTest.php, line 118
Class
- CurrentCurrencyTest
- Tests current currency class.
Namespace
Drupal\Tests\commerce_currency_resolver\KernelCode
public function testNoStore() {
$this
->assertEqual('HRK', $this
->config('commerce_currency_resolver.settings')
->get('currency_default'));
$this
->assertEqual('USD', $this->store
->getDefaultCurrencyCode());
$this
->assertEqual('USD', $this->currentCurrency
->getCurrency());
$this
->assertEqual(1, $this->store
->id());
$store = Store::load($this->store
->id());
$store
->delete();
$this
->assertEmpty(Store::load(1));
$this
->resetCurrencyContainer();
$this
->assertEqual('HRK', $this->currentCurrency
->getCurrency());
}