Definition of Drupal\update_test\MockFileTransfer.
<?php
/**
* @file
* Definition of Drupal\update_test\MockFileTransfer.
*/
namespace Drupal\update_test;
/**
* Mocks a FileTransfer object to test the settings form functionality.
*/
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['udpate_test_username'] = array(
'#type' => 'textfield',
'#title' => t('Update Test Username'),
);
return $form;
}
}
Name | Description |
---|---|
MockFileTransfer | Mocks a FileTransfer object to test the settings form functionality. |