function CurrencyExchangerUIWebTestCase::testCurrencyExchangerUI in Currency 7.2
Test CurrencyExchanger's UI.
File
- currency/
tests/ CurrencyConverterUIWebTestCase.test, line 35 - Contains class CurrencyExchangerUIWebTestCase.
Class
- CurrencyExchangerUIWebTestCase
- Tests the UI for CurrencyExchanger.
Code
function testCurrencyExchangerUI() {
$user = $this
->drupalCreateUser(array(
'currency.currency_exchanger.administer',
));
$this
->drupalLogin($user);
// Test the default configuration.
$this
->assertEqual(array(
'CurrencyExchangerFixedRates' => TRUE,
'CurrencyExchangerBartFeenstraCurrency' => TRUE,
), CurrencyExchanger::loadConfiguration());
// Test overridden configuration.
$path = 'admin/config/regional/currency-exchange';
$values = array(
'exchangers[CurrencyExchangerFixedRates][enabled]' => FALSE,
);
$this
->drupalPost($path, $values, t('Save'));
$this
->assertEqual(array(
'CurrencyExchangerFixedRates' => FALSE,
'CurrencyExchangerBartFeenstraCurrency' => TRUE,
), CurrencyExchanger::loadConfiguration());
}