function CurrencyLocalePatternUIWebTestCase::testCurrencyCurrencyLocalePatternUI in Currency 7.2
Test CurrencyCurrencyLocalePattern's UI.
File
- currency/
tests/ CurrencyLocalePatternUIWebTestCase.test, line 35 - Contains class CurrencyCurrencyLocalePatternUIWebTestCase.
Class
- CurrencyLocalePatternUIWebTestCase
- Tests the Ctools exportables UI for CurrencyLocalePattern exportables.
Code
function testCurrencyCurrencyLocalePatternUI() {
$user = $this
->drupalCreateUser(array(
'currency.currency_locale_pattern.administer',
));
$this
->drupalLogin($user);
$path = 'admin/config/regional/currency_locale_pattern/add';
// Test valid values.
$valid_values = array(
'locale[locale][language_code]' => 'nl',
'locale[locale][country_code]' => 'ZA',
'pattern' => 'foo',
'symbol_decimal_separator' => '@',
'symbol_grouping_separator' => '#',
);
$this
->drupalPost($path, $valid_values, t('Save'));
ctools_include('export');
$locale_pattern = ctools_export_crud_load('currency_locale_pattern', 'nl_ZA');
$this
->assertTrue($locale_pattern);
}