You are here

public function CurrentCurrencyOrderAdminTest::testCreateOrder in Commerce Currency Resolver 8

Tests creating an order.

Overrides OrderAdminTest::testCreateOrder

File

tests/src/FunctionalJavascript/CurrentCurrencyOrderAdminTest.php, line 99

Class

CurrentCurrencyOrderAdminTest
Tests the order admin UI.

Namespace

Drupal\Tests\commerce_currency_resolver\FunctionalJavascript

Code

public function testCreateOrder() {

  // Create an order through the add form.
  $this
    ->drupalGet('/admin/commerce/orders');

  // Verify that we have different currencies on store and one
  // with current currency check.
  $this
    ->assertEqual($this->store
    ->getDefaultCurrencyCode(), 'USD');
  $this
    ->assertEqual($this->currentCurrency
    ->getCurrency(), 'VUV');
  $this
    ->assertEqual(\Drupal::service('commerce_currency_resolver.current_currency')
    ->getCurrency(), 'VUV');
  parent::testCreateOrder();
}