Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
|
|
@ -240,7 +240,10 @@ abstract class TestBase {
|
|||
/**
|
||||
* The temporary file directory for the test environment.
|
||||
*
|
||||
* This is set in TestBase::prepareEnvironment().
|
||||
* This is set in TestBase::prepareEnvironment(). This value has to match the
|
||||
* temporary directory created in install_base_system() for test installs.
|
||||
*
|
||||
* @see install_base_system()
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
|||
22
core/modules/simpletest/src/Tests/WebTestBaseInstallTest.php
Normal file
22
core/modules/simpletest/src/Tests/WebTestBaseInstallTest.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\simpletest\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Tests the test-specifics customisations done in the installation.
|
||||
*
|
||||
* @group simpletest
|
||||
*/
|
||||
class WebTestBaseInstallTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Tests the Drupal install done in \Drupal\simpletest\WebTestBase::setUp().
|
||||
*/
|
||||
public function testInstall() {
|
||||
$htaccess_filename = $this->getTempFilesDirectory() . '/.htaccess';
|
||||
$this->assertTrue(file_exists($htaccess_filename), "$htaccess_filename exists");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -496,9 +496,15 @@ abstract class WebTestBase extends TestBase {
|
|||
$directory = DRUPAL_ROOT . '/' . $this->siteDirectory;
|
||||
copy(DRUPAL_ROOT . '/sites/default/default.settings.php', $directory . '/settings.php');
|
||||
|
||||
// All file system paths are created by System module during installation.
|
||||
// The public file system path is created during installation. Additionally,
|
||||
// during tests:
|
||||
// - The temporary directory is set and created by install_base_system().
|
||||
// - The private file directory is created post install by
|
||||
// WebTestBase::initConfig().
|
||||
// @see system_requirements()
|
||||
// @see TestBase::prepareEnvironment()
|
||||
// @see install_base_system()
|
||||
// @see\Drupal\simpletest\WebTestBase::initConfig()
|
||||
$settings['settings']['file_public_path'] = (object) [
|
||||
'value' => $this->publicFilesDirectory,
|
||||
'required' => TRUE,
|
||||
|
|
@ -587,15 +593,8 @@ abstract class WebTestBase extends TestBase {
|
|||
protected function initConfig(ContainerInterface $container) {
|
||||
$config = $container->get('config.factory');
|
||||
|
||||
// Manually create and configure private and temporary files directories.
|
||||
// While these could be preset/enforced in settings.php like the public
|
||||
// files directory above, some tests expect them to be configurable in the
|
||||
// UI. If declared in settings.php, they would no longer be configurable.
|
||||
// Manually create the private directory.
|
||||
file_prepare_directory($this->privateFilesDirectory, FILE_CREATE_DIRECTORY);
|
||||
file_prepare_directory($this->tempFilesDirectory, FILE_CREATE_DIRECTORY);
|
||||
$config->getEditable('system.file')
|
||||
->set('path.temporary', $this->tempFilesDirectory)
|
||||
->save();
|
||||
|
||||
// Manually configure the test mail collector implementation to prevent
|
||||
// tests from sending out emails and collect them in state instead.
|
||||
|
|
|
|||
Reference in a new issue