Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
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['update_test_username'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Update Test Username'),
|
||||
);
|
||||
return $form;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\update_test;
|
||||
|
||||
use Drupal\Core\FileTransfer\Local;
|
||||
|
||||
/**
|
||||
* Provides an object to test the settings form functionality.
|
||||
*
|
||||
* This class extends \Drupal\Core\FileTransfer\Local to make module install
|
||||
* testing via \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm and
|
||||
* authorize.php possible.
|
||||
*
|
||||
* @see \Drupal\update\Tests\FileTransferAuthorizeFormTest
|
||||
*/
|
||||
class TestFileTransferWithSettingsForm extends Local {
|
||||
|
||||
/**
|
||||
* Returns a Drupal\update_test\TestFileTransferWithSettingsForm object.
|
||||
*
|
||||
* @return \Drupal\update_test\TestFileTransferWithSettingsForm
|
||||
* A new Drupal\update_test\TestFileTransferWithSettingsForm object.
|
||||
*/
|
||||
public static function factory($jail, $settings) {
|
||||
return new static($jail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
}
|
|
@ -59,13 +59,13 @@ function update_test_update_status_alter(&$projects) {
|
|||
* Implements hook_filetransfer_info().
|
||||
*/
|
||||
function update_test_filetransfer_info() {
|
||||
// Define a mock file transfer method, to ensure that there will always be
|
||||
// at least one method available in the user interface (regardless of the
|
||||
// Define a test file transfer method, to ensure that there will always be at
|
||||
// least one method available in the user interface (regardless of the
|
||||
// environment in which the update manager tests are run).
|
||||
return array(
|
||||
'system_test' => array(
|
||||
'title' => t('Update Test FileTransfer'),
|
||||
'class' => 'Drupal\update_test\MockFileTransfer',
|
||||
'class' => 'Drupal\update_test\TestFileTransferWithSettingsForm',
|
||||
'weight' => -20,
|
||||
),
|
||||
);
|
||||
|
|
Reference in a new issue