summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-24 16:54:56 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-24 16:54:56 +0000
commit20ffb94644a56456fd5da95cada66dfe36b435e9 (patch)
tree977707981fe1e2d585f1df04c96bf6fc86b1a5c0 /modules/system/system.test
parent4f32e4165b8e0c9c77e89b482d25df5ce56d1f6b (diff)
downloadbrdo-20ffb94644a56456fd5da95cada66dfe36b435e9.tar.gz
brdo-20ffb94644a56456fd5da95cada66dfe36b435e9.tar.bz2
#605892 by ksenzee and justinrandell: Convert theme logo upload to filestream wrappers (with tests so we don't break it again).
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 9ff7f42af..608e3a6c1 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -1225,6 +1225,33 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
}
/**
+ * Test the theme settings form.
+ */
+ function testThemeSettings() {
+ // Specify a filesystem path to be used for the logo.
+ $file = current($this->drupalGetTestFiles('image'));
+ $edit = array(
+ 'default_logo' => FALSE,
+ 'logo_path' => $file->uri,
+ );
+ $this->drupalPost('admin/appearance/settings', $edit, t('Save configuration'));
+ $this->drupalGet('node');
+ $this->assertRaw($file->uri, t('Logo path successfully changed.'));
+
+ // Upload a file to use for the logo.
+ $file = current($this->drupalGetTestFiles('image'));
+ $edit = array(
+ 'default_logo' => FALSE,
+ 'logo_path' => '',
+ 'files[logo_upload]' => drupal_realpath($file->uri),
+ );
+ $options = array();
+ $this->drupalPost('admin/appearance/settings', $edit, t('Save configuration'), $options);
+ $this->drupalGet('node');
+ $this->assertRaw($file->name, t('Logo file successfully uploaded.'));
+ }
+
+ /**
* Test the administration theme functionality.
*/
function testAdministrationTheme() {