updated drupal core to 7.51

This commit is contained in:
Bachir Soussi Chiadmi
2016-11-01 18:21:48 +01:00
parent 2ed8b48636
commit 1f780c974e
227 changed files with 2960 additions and 762 deletions

View File

@@ -853,6 +853,13 @@ class DrupalWebTestCase extends DrupalTestCase {
*/
protected $cookieFile = NULL;
/**
* The cookies of the page currently loaded in the internal browser.
*
* @var array
*/
protected $cookies = array();
/**
* Additional cURL options.
*
@@ -942,7 +949,6 @@ class DrupalWebTestCase extends DrupalTestCase {
protected function drupalCreateNode($settings = array()) {
// Populate defaults array.
$settings += array(
'body' => array(LANGUAGE_NONE => array(array())),
'title' => $this->randomName(8),
'comment' => 2,
'changed' => REQUEST_TIME,
@@ -957,6 +963,12 @@ class DrupalWebTestCase extends DrupalTestCase {
'language' => LANGUAGE_NONE,
);
// Add the body after the language is defined so that it may be set
// properly.
$settings += array(
'body' => array($settings['language'] => array(array())),
);
// Use the original node's created time for existing nodes.
if (isset($settings['created']) && !isset($settings['date'])) {
$settings['date'] = format_date($settings['created'], 'custom', 'Y-m-d H:i:s O');
@@ -1693,8 +1705,10 @@ class DrupalWebTestCase extends DrupalTestCase {
$GLOBALS['conf']['language_default'] = $this->originalLanguageDefault;
}
// Close the CURL handler.
// Close the CURL handler and reset the cookies array so test classes
// containing multiple tests are not polluted.
$this->curlClose();
$this->cookies = array();
}
/**
@@ -2760,7 +2774,7 @@ class DrupalWebTestCase extends DrupalTestCase {
$path = substr($path, $length);
}
// Ensure that we have an absolute path.
if ($path[0] !== '/') {
if (empty($path) || $path[0] !== '/') {
$path = '/' . $path;
}
// Finally, prepend the $base_url.