updated core to 7.66

This commit is contained in:
2019-04-23 15:45:23 +02:00
parent 3d5c5ad2f6
commit ec21d1e45f
186 changed files with 2603 additions and 691 deletions
+3 -4
View File
@@ -7,8 +7,7 @@ files[] = aggregator.test
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = block.test
configure = admin/structure/block
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -13,8 +13,7 @@ regions[footer] = Footer
regions[highlighted] = Highlighted
regions[help] = Help
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = blog.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -7,8 +7,7 @@ files[] = book.test
configure = admin/content/book/settings
stylesheets[all][] = book.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+7 -4
View File
@@ -768,11 +768,13 @@ function book_prev($book_link) {
return NULL;
}
$flat = book_get_flat_menu($book_link);
// Assigning the array to $flat resets the array pointer for use with each().
reset($flat);
$curr = NULL;
do {
$prev = $curr;
list($key, $curr) = each($flat);
$curr = current($flat);
$key = key($flat);
next($flat);
} while ($key && $key != $book_link['mlid']);
if ($key == $book_link['mlid']) {
@@ -806,9 +808,10 @@ function book_prev($book_link) {
*/
function book_next($book_link) {
$flat = book_get_flat_menu($book_link);
// Assigning the array to $flat resets the array pointer for use with each().
reset($flat);
do {
list($key, $curr) = each($flat);
$key = key($flat);
next($flat);
}
while ($key && $key != $book_link['mlid']);
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = color.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -9,8 +9,7 @@ files[] = comment.test
configure = admin/content/comment
stylesheets[all][] = comment.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = contact.test
configure = admin/structure/contact
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = contextual.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -7,8 +7,7 @@ files[] = dashboard.test
dependencies[] = block
configure = admin/dashboard/customize
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = dblog.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -11,8 +11,7 @@ dependencies[] = field_sql_storage
required = TRUE
stylesheets[all][] = theme/field.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -7,8 +7,7 @@ dependencies[] = field
files[] = field_sql_storage.test
required = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -7,8 +7,7 @@ dependencies[] = field
dependencies[] = options
files[] = tests/list.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+8 -1
View File
@@ -61,7 +61,7 @@ function list_update_7001() {
// Additionally, float keys need to be disambiguated ('.5' is '0.5').
if ($field['type'] == 'list_number' && !empty($allowed_values)) {
$keys = array_map(create_function('$a', 'return (string) (float) $a;'), array_keys($allowed_values));
$keys = array_map('_list_update_7001_float_string_cast', array_keys($allowed_values));
$allowed_values = array_combine($keys, array_values($allowed_values));
}
@@ -88,6 +88,13 @@ function list_update_7001() {
}
}
/**
* Helper callback function to cast the array element.
*/
function _list_update_7001_float_string_cast($element) {
return (string) (float) $element;
}
/**
* Helper function for list_update_7001: extract allowed values from a string.
*
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = field
files[] = number.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+1 -1
View File
@@ -69,7 +69,7 @@ class NumberFieldTestCase extends DrupalWebTestCase {
preg_match('|test-entity/manage/(\d+)/edit|', $this->url, $match);
$id = $match[1];
$this->assertRaw(t('test_entity @id has been created.', array('@id' => $id)), 'Entity was created');
$this->assertRaw(round($value, 2), 'Value is displayed.');
$this->assertRaw($value, 'Value is displayed.');
// Try to create entries with more than one decimal separator; assert fail.
$wrong_entries = array(
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = field
files[] = options.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -7,8 +7,7 @@ dependencies[] = field
files[] = text.test
required = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ files[] = field_test.entity.inc
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = field
files[] = field_ui.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+1 -1
View File
@@ -599,7 +599,7 @@ function file_field_widget_value($element, $input = FALSE, $form_state) {
// If the display field is present make sure its unchecked value is saved.
$field = field_widget_field($element, $form_state);
if (empty($input['display'])) {
$input['display'] = $field['settings']['display_field'] ? 0 : 1;
$input['display'] = !empty($field['settings']['display_field']) ? 0 : 1;
}
}
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = field
files[] = tests/file.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3
View File
@@ -239,6 +239,9 @@ function file_ajax_upload() {
$form_parents = func_get_args();
$form_build_id = (string) array_pop($form_parents);
// Sanitize form parents before using them.
$form_parents = array_filter($form_parents, 'element_child');
if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {
// Invalid request.
drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', array('@size' => format_size(file_upload_max_size()))), 'error');
+57
View File
@@ -1875,3 +1875,60 @@ class FileFieldAnonymousSubmission extends FileFieldTestCase {
}
}
/**
* Tests the file_scan_directory() function.
*/
class FileScanDirectory extends FileFieldTestCase {
/**
* @var string
*/
protected $path;
/**
* {@inheritdoc}
*/
public static function getInfo() {
return array(
'name' => 'File ScanDirectory',
'description' => 'Tests the file_scan_directory() function.',
'group' => 'File',
);
}
/**
* {@inheritdoc}
*/
function setUp() {
parent::setUp();
$this->path = 'modules/file/tests/fixtures/file_scan_ignore';
}
/**
* Tests file_scan_directory() obeys 'file_scan_ignore_directories' setting.
* If nomask is not passed as argument, it should use the default settings.
* If nomask is passed as argument, it should obey this rule.
*/
public function testNoMask() {
$files = file_scan_directory($this->path, '/\.txt$/');
$this->assertEqual(3, count($files), '3 text files found when not ignoring directories.');
global $conf;
$conf['file_scan_ignore_directories'] = array('frontend_framework');
$files = file_scan_directory($this->path, '/\.txt$/');
$this->assertEqual(1, count($files), '1 text files found when ignoring directories called "frontend_framework".');
// Make that directories specified by default still work when a new nomask is provided.
$files = file_scan_directory($this->path, '/\.txt$/', array('nomask' => '/^c.txt/'));
$this->assertEqual(2, count($files), '2 text files found when an "nomask" option is passed in.');
// Ensure that the directories in file_scan_ignore_directories are escaped using preg_quote.
$conf['file_scan_ignore_directories'] = array('frontend.*');
$files = file_scan_directory($this->path, '/\.txt$/');
$this->assertEqual(3, count($files), '2 text files found when ignoring a directory that is not there.');
}
}
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -7,8 +7,7 @@ files[] = filter.test
required = TRUE
configure = admin/config/content/formats
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -9,8 +9,7 @@ files[] = forum.test
configure = admin/structure/forum
stylesheets[all][] = forum.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = help.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+2 -1
View File
@@ -736,7 +736,8 @@ function theme_image_style_effects($variables) {
if (!isset($form[$key]['#access']) || $form[$key]['#access']) {
$rows[] = array(
'data' => $row,
'class' => !empty($form[$key]['weight']['#access']) || $key == 'new' ? array('draggable') : array(),
// Use a strict (===) comparison since $key can be 0.
'class' => !empty($form[$key]['weight']['#access']) || $key === 'new' ? array('draggable') : array(),
);
}
}
+3 -4
View File
@@ -7,8 +7,7 @@ dependencies[] = file
files[] = image.test
configure = admin/config/media/image-styles
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = image_module_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = locale.test
configure = admin/config/regional/language
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+1 -5
View File
@@ -3188,11 +3188,7 @@ class LocaleLanguageNegotiationInfoFunctionalTest extends DrupalWebTestCase {
foreach (language_types_info() as $type => $info) {
if (isset($info['fixed'])) {
$negotiation = variable_get("language_negotiation_$type", array());
$equal = count($info['fixed']) == count($negotiation);
while ($equal && list($id) = each($negotiation)) {
list(, $info_id) = each($info['fixed']);
$equal = $info_id == $id;
}
$equal = array_keys($negotiation) === array_values($info['fixed']);
$this->assertTrue($equal, format_string('language negotiation for %type is properly set up', array('%type' => $type)));
}
}
+3 -4
View File
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = menu.test
configure = admin/structure/menu
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -9,8 +9,7 @@ required = TRUE
configure = admin/structure/types
stylesheets[all][] = node.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ package = Core
core = 7.x
files[] = openid.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = openid
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -4,8 +4,7 @@ package = Core
version = VERSION
core = 7.x
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = path.test
configure = admin/config/search/path
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+29 -1
View File
@@ -21,7 +21,7 @@ class PathTestCase extends DrupalWebTestCase {
parent::setUp('path');
// Create test user and login.
$web_user = $this->drupalCreateUser(array('create page content', 'edit own page content', 'administer url aliases', 'create url aliases'));
$web_user = $this->drupalCreateUser(array('create page content', 'edit own page content', 'administer url aliases', 'create url aliases', 'access content overview'));
$this->drupalLogin($web_user);
}
@@ -160,6 +160,34 @@ class PathTestCase extends DrupalWebTestCase {
$this->drupalGet($edit['path[alias]']);
$this->assertNoText($node1->title, 'Alias was successfully deleted.');
$this->assertResponse(404);
// Create third test node.
$node3 = $this->drupalCreateNode();
// Create an invalid alias with a leading slash and verify that the slash
// is removed when the link is generated. This ensures that URL aliases
// cannot be used to inject external URLs.
// @todo The user interface should either display an error message or
// automatically trim these invalid aliases, rather than allowing them to
// be silently created, at which point the functional aspects of this
// test will need to be moved elsewhere and switch to using a
// programmatically-created alias instead.
$alias = $this->randomName(8);
$edit = array('path[alias]' => '/' . $alias);
$this->drupalPost('node/' . $node3->nid . '/edit', $edit, t('Save'));
$this->drupalGet('admin/content');
// This checks the link href before clicking it, rather than using
// DrupalWebTestCase::assertUrl() after clicking it, because the test
// browser does not always preserve the correct number of slashes in the
// URL when it visits internal links; using DrupalWebTestCase::assertUrl()
// would actually make the test pass unconditionally on the testbot (or
// anywhere else where Drupal is installed in a subdirectory).
$link_xpath = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $node3->title));
$link_href = (string) $link_xpath[0]['href'];
$link_prefix = base_path() . (variable_get('clean_url', 0) ? '' : '?q=');
$this->assertEqual($link_href, $link_prefix . $alias);
$this->clickLink($node3->title);
$this->assertResponse(404);
}
/**
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = php.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = poll.test
stylesheets[all][] = poll.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -11,8 +11,7 @@ configure = admin/config/people/profile
; See user_system_info_alter().
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
files[] = rdf.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
hidden = TRUE
dependencies[] = blog
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -8,8 +8,7 @@ files[] = search.test
configure = admin/config/search/settings
stylesheets[all][] = search.css
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = shortcut.test
configure = admin/config/user-interface/shortcut
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+2 -2
View File
@@ -3012,7 +3012,7 @@ class DrupalWebTestCase extends DrupalTestCase {
if (!$message) {
$message = t('Raw "@raw" found', array('@raw' => $raw));
}
return $this->assert(strpos($this->drupalGetContent(), $raw) !== FALSE, $message, $group);
return $this->assert(strpos($this->drupalGetContent(), (string) $raw) !== FALSE, $message, $group);
}
/**
@@ -3032,7 +3032,7 @@ class DrupalWebTestCase extends DrupalTestCase {
if (!$message) {
$message = t('Raw "@raw" not found', array('@raw' => $raw));
}
return $this->assert(strpos($this->drupalGetContent(), $raw) === FALSE, $message, $group);
return $this->assert(strpos($this->drupalGetContent(), (string) $raw) === FALSE, $message, $group);
}
/**
Binary file not shown.
+3 -4
View File
@@ -57,8 +57,7 @@ files[] = tests/upgrade/update.trigger.test
files[] = tests/upgrade/update.field.test
files[] = tests/upgrade/update.user.test
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+2 -6
View File
@@ -729,16 +729,12 @@ class BootstrapMiscTestCase extends DrupalUnitTestCase {
* Tests that the drupal_check_memory_limit() function works as expected.
*/
function testCheckMemoryLimit() {
$memory_limit = ini_get('memory_limit');
// Test that a very reasonable amount of memory is available.
$this->assertTrue(drupal_check_memory_limit('30MB'), '30MB of memory tested available.');
// Get the available memory and multiply it by two to make it unreasonably
// high.
$twice_avail_memory = ($memory_limit * 2) . 'MB';
// Test an unlimited memory limit.
// The function should always return true if the memory limit is set to -1.
$this->assertTrue(drupal_check_memory_limit($twice_avail_memory, -1), 'drupal_check_memory_limit() returns TRUE when a limit of -1 (none) is supplied');
$this->assertTrue(drupal_check_memory_limit('9999999999YB', -1), 'drupal_check_memory_limit() returns TRUE when a limit of -1 (none) is supplied');
// Test that even though we have 30MB of memory available - the function
// returns FALSE when given an upper limit for how much memory can be used.
+3 -4
View File
@@ -7,8 +7,7 @@ stylesheets[all][] = common_test.css
stylesheets[print][] = common_test.print.css
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -7,8 +7,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -6,8 +6,7 @@ core = 7.x
dependencies[] = entity_cache_test_dependency
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+77
View File
@@ -957,6 +957,15 @@ class FileDirectoryTest extends FileTestCase {
$path = file_create_filename($basename, $directory);
$this->assertEqual($path, $expected, format_string('Creating a new filepath from %original equals %new.', array('%new' => $path, '%original' => $original)), 'File');
try {
$filename = "a\xFFtest\x80€.txt";
file_create_filename($filename, $directory);
$this->fail('Expected exception not thrown');
}
catch (RuntimeException $e) {
$this->assertEqual("Invalid filename '$filename'", $e->getMessage());
}
// @TODO: Finally we copy a file into a directory several times, to ensure a properly iterating filename suffix.
}
@@ -989,6 +998,14 @@ class FileDirectoryTest extends FileTestCase {
$this->assertNotEqual($path, $destination, 'A new filepath destination is created when filepath destination already exists with FILE_EXISTS_RENAME.', 'File');
$path = file_destination($destination, FILE_EXISTS_ERROR);
$this->assertEqual($path, FALSE, 'An error is returned when filepath destination already exists with FILE_EXISTS_ERROR.', 'File');
try {
file_destination("core/misc/a\xFFtest\x80€.txt", FILE_EXISTS_REPLACE);
$this->fail('Expected exception not thrown');
}
catch (RuntimeException $e) {
$this->assertEqual("Invalid filename 'a\xFFtest\x80€.txt'", $e->getMessage());
}
}
/**
@@ -2766,4 +2783,64 @@ class StreamWrapperTest extends DrupalWebTestCase {
$this->assertTrue(file_stream_wrapper_valid_scheme(file_uri_scheme('public://asdf')), 'Got a valid stream scheme from public://asdf');
$this->assertFalse(file_stream_wrapper_valid_scheme(file_uri_scheme('foo://asdf')), 'Did not get a valid stream scheme from foo://asdf');
}
/**
* Tests that phar stream wrapper is registered as expected.
*
* @see file_get_stream_wrappers()
*/
public function testPharStreamWrapperRegistration() {
if (!class_exists('Phar', FALSE)) {
$this->assertFalse(in_array('phar', stream_get_wrappers(), TRUE), 'PHP is compiled without phar support. Therefore, no phar stream wrapper is registered.');
}
elseif (version_compare(PHP_VERSION, '5.3.3', '<')) {
$this->assertFalse(in_array('phar', stream_get_wrappers(), TRUE), 'The PHP version is <5.3.3. The built-in phar stream wrapper has been unregistered and not replaced.');
}
else {
$this->assertTrue(in_array('phar', stream_get_wrappers(), TRUE), 'A phar stream wrapper is registered.');
$this->assertFalse(file_stream_wrapper_valid_scheme('phar'), 'The phar scheme is not a valid scheme for Drupal File API usage.');
}
// Ensure that calling file_get_stream_wrappers() multiple times, both
// without and with a drupal_static_reset() in between, does not create
// errors due to the PharStreamWrapperManager singleton.
file_get_stream_wrappers();
file_get_stream_wrappers();
drupal_static_reset('file_get_stream_wrappers');
file_get_stream_wrappers();
}
/**
* Tests that only valid phar files can be used.
*/
public function testPharFile() {
if (!in_array('phar', stream_get_wrappers(), TRUE)) {
$this->pass('There is no phar stream wrapper registered.');
// Nothing else in this test is relevant when there's no phar stream
// wrapper. testPharStreamWrapperRegistration() is sufficient for testing
// the conditions of when the stream wrapper should or should not be
// registered.
return;
}
$base = dirname(dirname(__FILE__)) . '/files';
// Ensure that file operations via the phar:// stream wrapper work for phar
// files with the .phar extension.
$this->assertFalse(file_exists("phar://$base/phar-1.phar/no-such-file.php"));
$this->assertTrue(file_exists("phar://$base/phar-1.phar/index.php"));
$file_contents = file_get_contents("phar://$base/phar-1.phar/index.php");
$expected_hash = 'c7e7904ea573c5ebea3ef00bb08c1f86af1a45961fbfbeb1892ff4a98fd73ad5';
$this->assertIdentical($expected_hash, hash('sha256', $file_contents));
// Ensure that file operations via the phar:// stream wrapper throw an
// exception for files without the .phar extension.
try {
file_exists("phar://$base/image-2.jpg/index.php");
$this->fail('Expected exception failed to be thrown when accessing an invalid phar file.');
}
catch (Exception $e) {
$this->assertEqual(get_class($e), 'TYPO3\PharStreamWrapper\Exception', 'Expected exception thrown when accessing an invalid phar file.');
}
}
}
+3 -4
View File
@@ -6,8 +6,7 @@ core = 7.x
files[] = file_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+53
View File
@@ -1420,6 +1420,59 @@ class FormsFormStoragePageCacheTestCase extends DrupalWebTestCase {
}
}
/**
* Test cache_form.
*/
class FormsFormCacheTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Form caching',
'description' => 'Tests storage and retrieval of forms from cache.',
'group' => 'Form API',
);
}
function setUp() {
parent::setUp('form_test');
}
/**
* Tests storing and retrieving the form from cache.
*/
function testCacheForm() {
$form = drupal_get_form('form_test_cache_form');
$form_state = array('foo' => 'bar', 'build_info' => array('baz'));
form_set_cache($form['#build_id'], $form, $form_state);
$cached_form_state = array();
$cached_form = form_get_cache($form['#build_id'], $cached_form_state);
$this->assertEqual($cached_form['#build_id'], $form['#build_id'], 'Form retrieved from cache_form successfully.');
$this->assertEqual($cached_form_state['foo'], 'bar', 'Data retrieved from cache_form successfully.');
}
/**
* Tests changing form_cache_expiration.
*/
function testCacheFormCustomExpiration() {
variable_set('form_cache_expiration', -1 * (24 * 60 * 60));
$form = drupal_get_form('form_test_cache_form');
$form_state = array('foo' => 'bar', 'build_info' => array('baz'));
form_set_cache($form['#build_id'], $form, $form_state);
// Clear expired entries from cache_form, which should include the entry we
// just stored. Without this, the form will still be retrieved from cache.
cache_clear_all(NULL, 'cache_form');
$cached_form_state = array();
$cached_form = form_get_cache($form['#build_id'], $cached_form_state);
$this->assertNull($cached_form, 'Expired form was not returned from cache.');
$this->assertTrue(empty($cached_form_state), 'No data retrieved from cache for expired form.');
}
}
/**
* Test wrapper form callbacks.
*/
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+18
View File
@@ -918,6 +918,24 @@ function form_test_storage_page_cache_rebuild($form, &$form_state) {
$form_state['rebuild'] = TRUE;
}
/**
* A simple form for testing form caching.
*/
function form_test_cache_form($form, &$form_state) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => 'Title',
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
return $form;
}
/**
* A form for testing form labels and required marks.
*/
+5 -3
View File
@@ -335,7 +335,9 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
);
// Systems using non-bundled GD2 don't have imagerotate. Test if available.
if (function_exists('imagerotate')) {
// @todo Remove the version check once https://www.drupal.org/node/2918570
// is resolved.
if (function_exists('imagerotate') && (version_compare(PHP_VERSION, '7.0.26', '<') || (version_compare(PHP_VERSION, '7.1', '>=') && version_compare(PHP_VERSION, '7.1.12', '<')))) {
$operations += array(
'rotate_90' => array(
'function' => 'rotate',
@@ -357,8 +359,8 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase {
// See https://bugs.php.net/bug.php?id=65148.
// For the 40x20 test images, the dimensions resulting from rotation will
// be 1 pixel smaller in both width and height in PHP 5.5 and above.
// @todo: If and when the PHP bug gets solved, add an upper limit
// version check.
// @todo: The PHP bug was fixed in PHP 7.0.26 and 7.1.12. Change the code
// below to reflect that in https://www.drupal.org/node/2918570.
if (version_compare(PHP_VERSION, '5.5', '>=')) {
$operations += array(
'rotate_5' => array(
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ core = 7.x
hidden = TRUE
package = Testing
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ core = 7.x
hidden = TRUE
package = Testing
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -7,8 +7,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
+3 -4
View File
@@ -5,8 +5,7 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"
@@ -6,8 +6,7 @@ core = 7.x
hidden = TRUE
dependencies[] = _missing_dependency
; Information added by Drupal.org packaging script on 2018-03-28
version = "7.58"
; Information added by Drupal.org packaging script on 2019-04-17
version = "7.66"
project = "drupal"
datestamp = "1522264019"
datestamp = "1555533576"

Some files were not shown because too many files have changed in this diff Show More