Tests whether the provided color is valid.
function testValidColor() {
variable_set('theme_default', 'bartik');
$settings_path = 'admin/appearance/settings/bartik';
$this
->drupalLogin($this->big_user);
$edit['scheme'] = '';
foreach ($this->colorTests as $color => $is_valid) {
$edit['palette[bg]'] = $color;
$this
->drupalPost($settings_path, $edit, t('Save configuration'));
if ($is_valid) {
$this
->assertText('The configuration options have been saved.');
}
else {
$this
->assertText('You must enter a valid hexadecimal color value for Main background.');
}
}
}