summaryrefslogtreecommitdiff
path: root/modules/update
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-10-05 02:17:44 +0000
committerDries Buytaert <dries@buytaert.net>2010-10-05 02:17:44 +0000
commit734972e2f5d149bf5f74a8fa00e000dbf5613106 (patch)
treee1695dc2f9546e29e4cb6c759d88f4f3f82bcede /modules/update
parentfe1e82eebc58b4b1e9a907d3cfb40f09ab653d9a (diff)
downloadbrdo-734972e2f5d149bf5f74a8fa00e000dbf5613106.tar.gz
brdo-734972e2f5d149bf5f74a8fa00e000dbf5613106.tar.bz2
- Patch #700558 by dww: add test to ensure filename extensions are properly merged in the Update manager UI.
Diffstat (limited to 'modules/update')
-rw-r--r--modules/update/tests/update_test.module13
-rw-r--r--modules/update/update.test14
2 files changed, 25 insertions, 2 deletions
diff --git a/modules/update/tests/update_test.module b/modules/update/tests/update_test.module
index 34608363a..9b8de5b45 100644
--- a/modules/update/tests/update_test.module
+++ b/modules/update/tests/update_test.module
@@ -99,3 +99,16 @@ function update_test_mock_page($project_name) {
$path = drupal_get_path('module', 'update_test');
readfile("$path/$project_name.$availability_scenario.xml");
}
+
+/**
+ * Implement hook_archiver_info().
+ */
+function update_test_archiver_info() {
+ return array(
+ 'update_test_archiver' => array(
+ // This is bogus, we only care about the extensions for now.
+ 'class' => 'ArchiverUpdateTest',
+ 'extensions' => array('update-test-extension'),
+ ),
+ );
+}
diff --git a/modules/update/update.test b/modules/update/update.test
index 2b6d84dcc..fcf4ea91c 100644
--- a/modules/update/update.test
+++ b/modules/update/update.test
@@ -564,7 +564,7 @@ class UpdateTestUploadCase extends UpdateTestHelper {
}
public function setUp() {
- parent::setUp('update');
+ parent::setUp('update', 'update_test');
variable_set('allow_authorize_operations', TRUE);
$admin_user = $this->drupalCreateUser(array('administer software updates', 'administer site configuration'));
$this->drupalLogin($admin_user);
@@ -593,5 +593,15 @@ class UpdateTestUploadCase extends UpdateTestHelper {
$this->drupalPost('admin/modules/install', $edit, t('Install'));
$this->assertText(t('@module_name is already installed.', array('@module_name' => 'AAA Update test')), 'Existing module was extracted and not reinstalled.');
}
-}
+ /**
+ * Ensure that archiver extensions are properly merged in the UI.
+ */
+ function testFileNameExtensionMerging() {
+ $this->drupalGet('admin/modules/install');
+ // Make sure the bogus extension supported by update_test.module is there.
+ $this->assertPattern('/archive extensions are supported:.*update-test-extension/', t("Found 'update-test-extension' extension"));
+ // Make sure it didn't clobber the first option from core.
+ $this->assertPattern('/archive extensions are supported:.*zip/', t("Found 'zip' extension"));
+ }
+}