3 namespace Drupal\update_test;
5 use Drupal\Core\FileTransfer\Local;
8 * Provides an object to test the settings form functionality.
10 * This class extends \Drupal\Core\FileTransfer\Local to make module install
11 * testing via \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm and
12 * authorize.php possible.
14 * @see \Drupal\update\Tests\FileTransferAuthorizeFormTest
16 class TestFileTransferWithSettingsForm extends Local {
19 * Returns a Drupal\update_test\TestFileTransferWithSettingsForm object.
21 * @return \Drupal\update_test\TestFileTransferWithSettingsForm
22 * A new Drupal\update_test\TestFileTransferWithSettingsForm object.
24 public static function factory($jail, $settings) {
25 return new static($jail);
29 * Returns a settings form with a text field to input a username.
31 public function getSettingsForm() {
33 $form['update_test_username'] = [
34 '#type' => 'textfield',
35 '#title' => t('Update Test Username'),