From 20ffb94644a56456fd5da95cada66dfe36b435e9 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 24 Dec 2009 16:54:56 +0000 Subject: #605892 by ksenzee and justinrandell: Convert theme logo upload to filestream wrappers (with tests so we don't break it again). --- modules/system/system.test | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'modules/system/system.test') 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 @@ -1224,6 +1224,33 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { $this->node = $this->drupalCreateNode(); } + /** + * 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. */ -- cgit v1.2.3