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:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -119,7 +119,11 @@ abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase {
/**
* The temp file directory for the test environment.
*
* This is set in BrowserTestBase::prepareEnvironment().
* This is set in BrowserTestBase::prepareEnvironment(). This value has to
* match the temporary directory created in install_base_system() for test
* installs.
*
* @see install_base_system()
*
* @var string
*/
@ -351,7 +355,11 @@ abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase {
$driver = $this->getDefaultDriverInstance();
if ($driver instanceof GoutteDriver) {
$driver->getClient()->setClient(\Drupal::httpClient());
// Turn off curl timeout. Having a timeout is not a problem in a normal
// test running, but it is a problem when debugging.
/** @var \GuzzleHttp\Client $client */
$client = $this->container->get('http_client_factory')->fromOptions(['timeout' => NULL]);
$driver->getClient()->setClient($client);
}
$session = new Session($driver);
@ -1015,9 +1023,13 @@ abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase {
$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 this method.
// @see system_requirements()
// @see TestBase::prepareEnvironment()
// @see install_base_system()
$settings['settings']['file_public_path'] = (object) array(
'value' => $this->publicFilesDirectory,
'required' => TRUE,
@ -1092,16 +1104,8 @@ abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase {
$config = $container->get('config.factory');
// Manually create and configure private and temporary files directories.
// Manually create the private directory.
file_prepare_directory($this->privateFilesDirectory, FILE_CREATE_DIRECTORY);
file_prepare_directory($this->tempFilesDirectory, FILE_CREATE_DIRECTORY);
// While the temporary files path could be preset/enforced in settings.php
// like the public files directory above, some tests expect it to be
// configurable in the UI. If declared in settings.php, it would no longer
// be configurable.
$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.