function CurrencyLocaleFormElementWebTestCase::testValidation in Currency 7.2
Test validation.
File
- currency/
tests/ CurrencyLocaleFormElementWebTestCase.test, line 35 - Contains class CurrencyAmountFormElementWebTestCase.
Class
- CurrencyLocaleFormElementWebTestCase
- Tests the currency_amount form element.
Code
function testValidation() {
$path = 'currency_test-form-element-currency-locale';
// Test valid values.
$values = array(
'locale[locale][language_code]' => 'nl',
'locale[locale][country_code]' => 'ZA',
);
$this
->drupalPost($path, $values, t('Submit'));
$this
->assertUrl('user');
$this
->assertRaw("\$form_state['locale'] = " . var_export('nl_ZA', TRUE));
}