You are here

public function CommerceBaseTestCase::enableCurrencies in Commerce Core 7

Enable extra currencies in the store.

Parameters

$currencies: Array of currency codes to be enabled

2 calls to CommerceBaseTestCase::enableCurrencies()
CommerceBaseTesterTestCase::testEnableCurrencies in tests/commerce_base.test
Test enabling extra currencies.
CommerceOrderUIAdminTest::setUp in modules/order/tests/commerce_order_ui.test
Implementation of setUp().

File

tests/commerce_base.test, line 608
Defines abstract base test class for the Commerce module tests.

Class

CommerceBaseTestCase
Abstract class for Commerce testing. All Commerce tests should extend this class.

Code

public function enableCurrencies($currencies) {
  $currencies = array_merge(drupal_map_assoc($currencies), variable_get('commerce_enabled_currencies', array(
    'USD' => 'USD',
  )));
  variable_set('commerce_enabled_currencies', $currencies);
}