You are here

public function CommerceBaseTesterTestCase::testEnableCurrencies in Commerce Core 7

Test enabling extra currencies.

File

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

Class

CommerceBaseTesterTestCase
Test class to test the CommerceBaseTestCase functions. All testTestFoo functions have "testTest" in the name to indicate that they are verifying that a test is working. Somewhat "meta" to do this, but it eases test development.

Code

public function testEnableCurrencies() {

  // Enable Euros.
  $this
    ->enableCurrencies(array(
    'EUR',
  ));

  // Check if Euros is enabled.
  $this
    ->assertTrue(in_array('EUR', variable_get('commerce_enabled_currencies', array(
    'USD' => 'USD',
  ))), t('Euros are enabled'));
}