You are here

class MockFileTransfer in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/system/tests/modules/system_test/src/MockFileTransfer.php \Drupal\system_test\MockFileTransfer
  2. 8 core/modules/update/tests/modules/update_test/src/MockFileTransfer.php \Drupal\update_test\MockFileTransfer
Same name and namespace in other branches
  1. 8.0 core/modules/update/tests/modules/update_test/src/MockFileTransfer.php \Drupal\update_test\MockFileTransfer

Mocks a FileTransfer object to test the settings form functionality.

Hierarchy

Expanded class hierarchy of MockFileTransfer

File

core/modules/update/tests/modules/update_test/src/MockFileTransfer.php, line 13
Contains \Drupal\update_test\MockFileTransfer.

Namespace

Drupal\update_test
View source
class MockFileTransfer {

  /**
   * Returns a Drupal\update_test\MockFileTransfer object.
   *
   * @return \Drupal\update_test\MockFileTransfer
   *   A new Drupal\update_test\MockFileTransfer object.
   */
  public static function factory() {
    return new FileTransfer();
  }

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

}

Members

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