summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"));
+ }
+}