You are here

class UpdateTestFileTransfer in Drupal 7

Mocks a FileTransfer object to test the settings form functionality.

Hierarchy

Expanded class hierarchy of UpdateTestFileTransfer

1 string reference to 'UpdateTestFileTransfer'
update_test_filetransfer_info in modules/update/tests/update_test.module
Implements hook_filetransfer_info().

File

modules/update/tests/update_test.module, line 159
Module for testing Update Manager functionality.

View source
class UpdateTestFileTransfer {

  /**
   * Returns an UpdateTestFileTransfer object.
   *
   * @return
   *   A new UpdateTestFileTransfer object.
   */
  public static function factory() {
    return new UpdateTestFileTransfer();
  }

  /**
   * Returns a settings form with a text field to input a username.
   */
  public function getSettingsForm() {
    $form = array();
    $form['udpate_test_username'] = array(
      '#type' => 'textfield',
      '#title' => t('Update Test Username'),
    );
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UpdateTestFileTransfer::factory public static function Returns an UpdateTestFileTransfer object.
UpdateTestFileTransfer::getSettingsForm public function Returns a settings form with a text field to input a username.