cvs diff: Diffing modules/update
Index: modules/update/update.test
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/update/update.test,v
retrieving revision 1.20
diff -u -p -r1.20 update.test
--- modules/update/update.test	23 Oct 2010 15:48:45 -0000	1.20
+++ modules/update/update.test	15 Nov 2010 18:01:14 -0000
@@ -664,3 +664,32 @@ class UpdateTestUploadCase extends Updat
   }
 
 }
+
+class UpdateExtensibilityTestCase extends UpdateTestHelper {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Update extensibility functionality',
+      'description' => 'Tests the update module to ensure it can be properly extended from contrib..',
+      'group' => 'Update',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('update_test', 'update');
+  }
+
+  /**
+   * Tests the update module when no updates are available.
+   */
+  function testAddNewModuleUpdater() {
+
+      // Make sure the Updater registry is loaded.
+      drupal_get_updaters();
+
+      $updater = Updater::factory('modules/system');
+
+      $this->assertTrue($updater instanceof UpdateTestModuleUpdater, t('Correct Updater class returned.'));
+   }
+
+}
cvs diff: Diffing modules/update/tests
Index: modules/update/tests/update_test.module
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/update/tests/update_test.module,v
retrieving revision 1.6
diff -u -p -r1.6 update_test.module
--- modules/update/tests/update_test.module	5 Oct 2010 02:17:44 -0000	1.6
+++ modules/update/tests/update_test.module	15 Nov 2010 18:03:13 -0000
@@ -112,3 +112,25 @@ function update_test_archiver_info() {
     ),
   );
 }
+
+/**
+ * Implements hook_updater_info().
+ */
+function update_test_updater_info() {
+  // This fake updater class should be selected for all module update attempts
+  // due to the very low weight.
+  return array(
+    'module_test' => array(
+      'class' => 'UpdateTestModuleUpdater',
+      'name' => t('Update modules, test version'),
+      'weight' => -100,
+    ),
+  );
+}
+
+/**
+ * Fake ModuleUpdater class to ensure we can swap out Updater classes.
+ */
+class UpdateTestModuleUpdater extends ModuleUpdater {
+
+}
