mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2025-09-07 17:21:22 +00:00
Update Drupal 7 dependencies
This commit is contained in:
parent
7d902ba1ef
commit
13df912654
391 changed files with 2900 additions and 1502 deletions
|
@ -7,7 +7,7 @@ files[] = aggregator.test
|
|||
configure = admin/config/services/aggregator/settings
|
||||
stylesheets[all][] = aggregator.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = tests/announce_feed_test.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -4,7 +4,7 @@ package = Testing
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = block.test
|
||||
configure = admin/structure/block
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -13,7 +13,7 @@ regions[footer] = Footer
|
|||
regions[highlighted] = Highlighted
|
||||
regions[help] = Help
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = blog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ files[] = book.test
|
|||
configure = admin/content/book/settings
|
||||
stylesheets[all][] = book.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = color.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -9,7 +9,7 @@ files[] = comment.test
|
|||
configure = admin/content/comment
|
||||
stylesheets[all][] = comment.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = contact.test
|
||||
configure = admin/structure/contact
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = contextual.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ files[] = dashboard.test
|
|||
dependencies[] = block
|
||||
configure = admin/dashboard/customize
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = dblog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -128,12 +128,30 @@ class DBLogTestCase extends DrupalWebTestCase {
|
|||
$count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField();
|
||||
$this->assertTrue($count > $row_limit, format_string('Dblog row count of @count exceeds row limit of @limit', array('@count' => $count, '@limit' => $row_limit)));
|
||||
|
||||
// Get last ID to compare against; log entries get deleted, so we can't
|
||||
// reliably add the number of newly created log entries to the current count
|
||||
// to measure number of log entries created by cron.
|
||||
$last_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField();
|
||||
|
||||
// Run a cron job.
|
||||
$this->cronRun();
|
||||
// Verify that the database log row count equals the row limit plus one
|
||||
// because cron adds a record after it runs.
|
||||
$count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField();
|
||||
$this->assertTrue($count == $row_limit + 1, format_string('Dblog row count of @count equals row limit of @limit plus one', array('@count' => $count, '@limit' => $row_limit)));
|
||||
|
||||
// Get last ID after cron was run.
|
||||
$current_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField();
|
||||
|
||||
// Only one final "cron is finished" message should be logged.
|
||||
$this->assertEqual($current_id - $last_id, 1, format_string('Cron added @count of @expected new log entries', array('@count' => $current_id - $last_id, '@expected' => 1)));
|
||||
|
||||
// Test enabling of detailed cron logging.
|
||||
// Get the number of enabled modules. Cron adds a log entry for each module.
|
||||
$module_count = count(module_implements('cron'));
|
||||
variable_set('cron_detailed_logging', 1);
|
||||
$last_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField();
|
||||
$this->cronRun();
|
||||
$current_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField();
|
||||
|
||||
// The number of log entries created.
|
||||
$this->assertEqual($current_id - $last_id, $module_count + 2, format_string('Cron added @count of @expected new log entries', array('@count' => $current_id - $last_id, '@expected' => $module_count + 2)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies[] = field_sql_storage
|
|||
required = TRUE
|
||||
stylesheets[all][] = theme/field.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies[] = field
|
|||
files[] = field_sql_storage.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies[] = field
|
|||
dependencies[] = options
|
||||
files[] = tests/list.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = field
|
||||
files[] = number.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = field
|
||||
files[] = options.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies[] = field
|
|||
files[] = text.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -377,6 +377,15 @@ class TextSummaryTestCase extends DrupalWebTestCase {
|
|||
// Test text_summary() for different sizes.
|
||||
for ($i = 0; $i <= 37; $i++) {
|
||||
$this->callTextSummary($text, $expected[$i], NULL, $i);
|
||||
|
||||
// libxml2 library changed parsing behavior on version 2.9.14. Skip
|
||||
// specific edge-case testing for all further versions.
|
||||
// @see https://gitlab.gnome.org/GNOME/libxml2/-/issues/474
|
||||
// @see https://www.drupal.org/project/drupal/issues/3397882
|
||||
if ($i == 1 && defined('LIBXML_VERSION') && LIBXML_VERSION >= 20914) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->callTextSummary($text, $expected_lb[$i], 'plain_text', $i);
|
||||
$this->callTextSummary($text, $expected_lb[$i], 'filtered_html', $i);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ files[] = field_test.entity.inc
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = field
|
||||
files[] = field_ui.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = field
|
||||
files[] = tests/file.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ files[] = filter.test
|
|||
required = TRUE
|
||||
configure = admin/config/content/formats
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -1515,14 +1515,26 @@ function _filter_url($text, $filter) {
|
|||
// re-split after each task, since all injected HTML tags must be correctly
|
||||
// protected before the next task.
|
||||
foreach ($tasks as $task => $pattern) {
|
||||
// Store the current text in case any of the preg_* functions fail.
|
||||
$saved_text = $text;
|
||||
|
||||
// HTML comments need to be handled separately, as they may contain HTML
|
||||
// markup, especially a '>'. Therefore, remove all comment contents and add
|
||||
// them back later.
|
||||
_filter_url_escape_comments('', TRUE);
|
||||
$text = preg_replace_callback('`<!--(.*?)-->`s', '_filter_url_escape_comments', $text);
|
||||
if (preg_last_error()) {
|
||||
$text = $saved_text;
|
||||
continue 1;
|
||||
}
|
||||
|
||||
// Split at all tags; ensures that no tags or attributes are processed.
|
||||
$chunks = preg_split('/(<.+?>)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
if (preg_last_error()) {
|
||||
$text = $saved_text;
|
||||
continue 1;
|
||||
}
|
||||
|
||||
// PHP ensures that the array consists of alternating delimiters and
|
||||
// literals, and begins and ends with a literal (inserting NULL as
|
||||
// required). Therefore, the first chunk is always text:
|
||||
|
@ -1539,6 +1551,10 @@ function _filter_url($text, $filter) {
|
|||
// If there is a match, inject a link into this chunk via the callback
|
||||
// function contained in $task.
|
||||
$chunks[$i] = preg_replace_callback($pattern, $task, $chunks[$i]);
|
||||
if (preg_last_error()) {
|
||||
$text = $saved_text;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
// Text chunk is done, so next chunk must be a tag.
|
||||
$chunk_type = 'tag';
|
||||
|
@ -1566,6 +1582,10 @@ function _filter_url($text, $filter) {
|
|||
// Revert back to the original comment contents
|
||||
_filter_url_escape_comments('', FALSE);
|
||||
$text = preg_replace_callback('`<!--(.*?)-->`', '_filter_url_escape_comments', $text);
|
||||
if (preg_last_error()) {
|
||||
$text = $saved_text;
|
||||
continue 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
|
|
@ -1637,6 +1637,7 @@ www.example.com with a newline in comments -->
|
|||
* comments.
|
||||
* - Empty HTML tags (BR, IMG).
|
||||
* - Mix of absolute and partial URLs, and e-mail addresses in one content.
|
||||
* - Input that exceeds PCRE backtracking limit.
|
||||
*/
|
||||
function testUrlFilterContent() {
|
||||
// Setup dummy filter object.
|
||||
|
@ -1650,6 +1651,16 @@ www.example.com with a newline in comments -->
|
|||
$expected = file_get_contents($path . '/filter.url-output.txt');
|
||||
$result = _filter_url($input, $filter);
|
||||
$this->assertIdentical($result, $expected, 'Complex HTML document was correctly processed.');
|
||||
|
||||
// Case of a small and simple HTML document.
|
||||
$input = $expected = '<p>www.test.com</p>';
|
||||
$result = $this->filterUrlWithPcreErrors($input, $filter);
|
||||
$this->assertIdentical($expected, $result, 'Simple HTML document was left intact when PCRE errors occurred.');
|
||||
|
||||
// Case of a complex HTML document.
|
||||
$input = $expected = file_get_contents($path . '/filter.url-input.txt');
|
||||
$result = $this->filterUrlWithPcreErrors($input, $filter);
|
||||
$this->assertIdentical($expected, $result, 'Complex HTML document was left intact when PCRE errors occurred.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1890,6 +1901,28 @@ body {color:red}
|
|||
function assertNoNormalized($haystack, $needle, $message = '', $group = 'Other') {
|
||||
return $this->assertTrue(strpos(strtolower(decode_entities($haystack)), $needle) === FALSE, $message, $group);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls filter_url with pcre.backtrack_limit set to 1.
|
||||
*
|
||||
* When PCRE errors occur, _filter_url() returns the input text unchanged.
|
||||
*
|
||||
* @param $input
|
||||
* Text to pass on to _filter_url().
|
||||
* @param $filter
|
||||
* Filter to pass on to _filter_url().
|
||||
* @return
|
||||
* The processed $input.
|
||||
*/
|
||||
protected function filterUrlWithPcreErrors($input, $filter) {
|
||||
$pcre_backtrack_limit = ini_get('pcre.backtrack_limit');
|
||||
// Setting this limit to the smallest possible value should cause PCRE
|
||||
// errors and break the various preg_* functions used by _filter_url().
|
||||
ini_set('pcre.backtrack_limit', 1);
|
||||
$result = _filter_url($input, $filter);
|
||||
ini_set('pcre.backtrack_limit', $pcre_backtrack_limit);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@ files[] = forum.test
|
|||
configure = admin/structure/forum
|
||||
stylesheets[all][] = forum.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = help.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ dependencies[] = file
|
|||
files[] = image.test
|
||||
configure = admin/config/media/image-styles
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ files[] = image_module_styles_test.module
|
|||
dependencies[] = image_module_test
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = image_module_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = locale.test
|
||||
configure = admin/config/regional/language
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = menu.test
|
||||
configure = admin/structure/menu
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -165,12 +165,7 @@ function node_filter_form() {
|
|||
);
|
||||
foreach ($session as $filter) {
|
||||
list($type, $value) = $filter;
|
||||
if ($type == 'term') {
|
||||
// Load term name from DB rather than search and parse options array.
|
||||
$value = module_invoke('taxonomy', 'term_load', $value);
|
||||
$value = $value->name;
|
||||
}
|
||||
elseif ($type == 'language') {
|
||||
if ($type == 'language') {
|
||||
$value = $value == LANGUAGE_NONE ? t('Language neutral') : module_invoke('locale', 'language_name', $value);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -9,7 +9,7 @@ required = TRUE
|
|||
configure = admin/structure/types
|
||||
stylesheets[all][] = node.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Core
|
|||
core = 7.x
|
||||
files[] = openid.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = openid
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -229,7 +229,7 @@ Drupal.overlay.destroy = function () {
|
|||
*/
|
||||
Drupal.overlay.redirect = function (url) {
|
||||
// Create a native Link object, so we can use its object methods.
|
||||
var link = $(url.link(url)).get(0);
|
||||
var link = $("<a>").attr("href", url).get(0);
|
||||
|
||||
// If the link is already open, force the hashchange event to simulate reload.
|
||||
if (window.location.href == link.href) {
|
||||
|
@ -865,7 +865,7 @@ Drupal.overlay.resetActiveClass = function(activePath) {
|
|||
Drupal.overlay.getPath = function (link, ignorePathFromQueryString) {
|
||||
if (typeof link == 'string') {
|
||||
// Create a native Link object, so we can use its object methods.
|
||||
link = $(link.link(link)).get(0);
|
||||
link = $("<a>").attr("href", link).get(0);
|
||||
}
|
||||
|
||||
var path = link.pathname;
|
||||
|
|
|
@ -4,7 +4,7 @@ package = Core
|
|||
version = VERSION
|
||||
core = 7.x
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = path.test
|
||||
configure = admin/config/search/path
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -41,6 +41,7 @@ function path_permission() {
|
|||
return array(
|
||||
'administer url aliases' => array(
|
||||
'title' => t('Administer URL aliases'),
|
||||
'restrict access' => TRUE,
|
||||
),
|
||||
'create url aliases' => array(
|
||||
'title' => t('Create and edit URL aliases'),
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = php.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = poll.test
|
||||
stylesheets[all][] = poll.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -11,7 +11,7 @@ configure = admin/config/people/profile
|
|||
; See user_system_info_alter().
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
files[] = rdf.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
hidden = TRUE
|
||||
dependencies[] = blog
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -8,7 +8,7 @@ files[] = search.test
|
|||
configure = admin/config/search/settings
|
||||
stylesheets[all][] = search.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = shortcut.test
|
||||
configure = admin/config/user-interface/shortcut
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -560,23 +560,22 @@ abstract class DrupalTestCase {
|
|||
'function' => $class . '->' . $method . '()',
|
||||
);
|
||||
$completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
|
||||
$this->setUp();
|
||||
if ($this->setup) {
|
||||
try {
|
||||
try {
|
||||
$this->setUp();
|
||||
if ($this->setup) {
|
||||
$this->$method();
|
||||
// Finish up.
|
||||
$this->tearDown();
|
||||
}
|
||||
catch (Throwable $e) {
|
||||
$this->exceptionHandler($e);
|
||||
else {
|
||||
$this->fail(t("The test cannot be executed because it has not been set up properly."));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
// Cater for older PHP versions.
|
||||
$this->exceptionHandler($e);
|
||||
}
|
||||
$this->tearDown();
|
||||
}
|
||||
else {
|
||||
$this->fail(t("The test cannot be executed because it has not been set up properly."));
|
||||
catch (Throwable $e) {
|
||||
$this->exceptionHandler($e);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
// Cater for older PHP versions.
|
||||
$this->exceptionHandler($e);
|
||||
}
|
||||
// Remove the completion check record.
|
||||
DrupalTestCase::deleteAssert($completion_check_id);
|
||||
|
|
|
@ -58,7 +58,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 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -443,7 +443,7 @@ function simpletest_settings_form($form, &$form_state) {
|
|||
$form['general']['simpletest_clear_results'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Clear results after each complete test suite run'),
|
||||
'#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/config/development/testing/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'),
|
||||
'#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/config/development/testing/results/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'),
|
||||
'#default_value' => variable_get('simpletest_clear_results', TRUE),
|
||||
);
|
||||
$form['general']['simpletest_verbose'] = array(
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -618,4 +618,16 @@ class AJAXElementValidation extends AJAXTestCase {
|
|||
$this->assertNoText(t('Error message'), "No error message in resultant JSON");
|
||||
$this->assertText('ajax_forms_test_validation_form_callback invoked', 'The correct callback was invoked');
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to open default Ajax callback without passing required data.
|
||||
*/
|
||||
function testAJAXPathWithoutData() {
|
||||
$this->drupalGet('system/ajax');
|
||||
$query_parameters = array(
|
||||
':type' => 'php',
|
||||
':severity' => WATCHDOG_WARNING,
|
||||
);
|
||||
$this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchField(), 0, 'No warning message appears in the logs.');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -963,3 +963,62 @@ class BootstrapDrupalCacheArrayTestCase extends DrupalWebTestCase {
|
|||
$this->assertTrue(is_string($payload2) && (strpos($payload2, 'phpinfo') !== FALSE), 'DrupalCacheArray persisted data to cache_form.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the trusted HTTP host configuration.
|
||||
*/
|
||||
class BootstrapTrustedHostsTestCase extends DrupalUnitTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Trusted HTTP host test',
|
||||
'description' => 'Tests the trusted_host_patterns configuration.',
|
||||
'group' => 'Bootstrap',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests hostname validation.
|
||||
*
|
||||
* @see drupal_check_trusted_hosts()
|
||||
*/
|
||||
function testTrustedHosts() {
|
||||
$trusted_host_patterns = array(
|
||||
'^example\.com$',
|
||||
'^.+\.example\.com$',
|
||||
'^example\.org',
|
||||
'^.+\.example\.org',
|
||||
);
|
||||
|
||||
foreach ($this->providerTestTrustedHosts() as $data) {
|
||||
$test = array_combine(array('host', 'message', 'expected'), $data);
|
||||
$valid_host = drupal_check_trusted_hosts($test['host'], $trusted_host_patterns);
|
||||
$this->assertEqual($test['expected'], $valid_host, $test['message']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides test data for testTrustedHosts().
|
||||
*/
|
||||
public function providerTestTrustedHosts() {
|
||||
$data = array();
|
||||
|
||||
// Tests canonical URL.
|
||||
$data[] = array('www.example.com', 'canonical URL is trusted', TRUE);
|
||||
|
||||
// Tests missing hostname for HTTP/1.0 compatability where the Host
|
||||
// header is optional.
|
||||
$data[] = array(NULL, 'empty Host is valid', TRUE);
|
||||
|
||||
// Tests the additional patterns from the settings.
|
||||
$data[] = array('example.com', 'host from settings is trusted', TRUE);
|
||||
$data[] = array('subdomain.example.com', 'host from settings is trusted', TRUE);
|
||||
$data[] = array('www.example.org', 'host from settings is trusted', TRUE);
|
||||
$data[] = array('example.org', 'host from settings is trusted', TRUE);
|
||||
|
||||
// Tests mismatch.
|
||||
$data[] = array('www.blackhat.com', 'unspecified host is untrusted', FALSE);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,20 +303,6 @@ class CacheClearCase extends CacheTestCase {
|
|||
|
||||
$this->assertTrue($this->checkCacheExists('test_cid_clear3', $this->default_value),
|
||||
'Entry was not cleared from the cache');
|
||||
|
||||
// Set the cache clear threshold to 2 to confirm that the full bin is cleared
|
||||
// when the threshold is exceeded.
|
||||
variable_set('cache_clear_threshold', 2);
|
||||
cache_set('test_cid_clear1', $this->default_value, $this->default_bin);
|
||||
cache_set('test_cid_clear2', $this->default_value, $this->default_bin);
|
||||
$this->assertTrue($this->checkCacheExists('test_cid_clear1', $this->default_value)
|
||||
&& $this->checkCacheExists('test_cid_clear2', $this->default_value),
|
||||
'Two cache entries were created.');
|
||||
cache_clear_all(array('test_cid_clear1', 'test_cid_clear2', 'test_cid_clear3'), $this->default_bin);
|
||||
$this->assertFalse($this->checkCacheExists('test_cid_clear1', $this->default_value)
|
||||
|| $this->checkCacheExists('test_cid_clear2', $this->default_value)
|
||||
|| $this->checkCacheExists('test_cid_clear3', $this->default_value),
|
||||
'All cache entries removed when the array exceeded the cache clear threshold.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@ stylesheets[all][] = common_test.css
|
|||
stylesheets[print][] = common_test.print.css
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -7,7 +7,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
dependencies[] = entity_cache_test_dependency
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -58,4 +58,33 @@ class EntityLoadTestCase extends DrupalWebTestCase {
|
|||
$nodes_loaded = entity_load('node', array('1.', '2'));
|
||||
$this->assertEqual(count($nodes_loaded), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the controller class loading functionality on non-existing entity
|
||||
* types and on entities without valid controller class.
|
||||
*/
|
||||
public function testEntityLoadInvalidControllerClass() {
|
||||
// Ensure that loading a non-existing entity type will throw an
|
||||
// EntityMalformedException.
|
||||
try {
|
||||
entity_load('test', array('1'));
|
||||
$this->fail(t('Cannot load a controller class on non-existing entity type.'));
|
||||
}
|
||||
catch (EntityMalformedException $e) {
|
||||
$this->pass(t('Cannot load a controller class on non-existing entity type.'));
|
||||
}
|
||||
|
||||
// Ensure that loading an entity without valid controller class will throw
|
||||
// an EntityMalformedException.
|
||||
module_enable(array('entity_crud_hook_test'));
|
||||
variable_set('entity_crud_hook_test_alter_controller_class', TRUE);
|
||||
try {
|
||||
entity_load('node', array('1'));
|
||||
$this->fail(t('Cannot load a missing or non-existent controller class.'));
|
||||
}
|
||||
catch (EntityMalformedException $e) {
|
||||
$this->pass(t('Cannot load a missing or non-existent controller class.'));
|
||||
}
|
||||
variable_set('entity_crud_hook_test_alter_controller_class', FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ package = Testing
|
|||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -249,3 +249,13 @@ function entity_crud_hook_test_taxonomy_vocabulary_delete() {
|
|||
function entity_crud_hook_test_user_delete() {
|
||||
$_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_entity_info_alter().
|
||||
*/
|
||||
function entity_crud_hook_test_entity_info_alter(&$entity_info) {
|
||||
if (variable_get('entity_crud_hook_test_alter_controller_class', FALSE)) {
|
||||
// Set the controller class for nodes to NULL.
|
||||
$entity_info['node']['controller class'] = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -103,6 +103,15 @@ class DrupalErrorHandlerTestCase extends DrupalWebTestCase {
|
|||
function assertErrorMessage(array $error) {
|
||||
$message = t('%type: !message in %function (line ', $error);
|
||||
$this->assertRaw($message, format_string('Found error message: !message.', array('!message' => $message)));
|
||||
|
||||
// Also check that no full path from the error is displayed.
|
||||
$this->assertNoRaw($error['%file'], format_string('Full path from error not displayed: %file.', array('%file' => $error['%file'])));
|
||||
|
||||
// Check that the path was displayed with the DRUPAL_ROOT hidden.
|
||||
$root_length = strlen(DRUPAL_ROOT);
|
||||
$stripped_path = substr($error['%file'], $root_length + 1);
|
||||
$sanitized_path = t('of %path)', array('%path' => $stripped_path));
|
||||
$this->assertRaw($sanitized_path, 'Path in error message was sanitized.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,5 +120,8 @@ class DrupalErrorHandlerTestCase extends DrupalWebTestCase {
|
|||
function assertNoErrorMessage(array $error) {
|
||||
$message = t('%type: !message in %function (line ', $error);
|
||||
$this->assertNoRaw($message, format_string('Did not find error message: !message.', array('!message' => $message)));
|
||||
|
||||
// Also check that no full path from the error is displayed.
|
||||
$this->assertNoRaw($error['%file'], format_string('Full path from error not displayed: %file.', array('%file' => $error['%file'])));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -2616,11 +2616,16 @@ class FileDownloadTest extends FileTestCase {
|
|||
$url = file_create_url($file->uri);
|
||||
|
||||
// Set file_test access header to allow the download.
|
||||
file_test_reset();
|
||||
file_test_set_return('download', array('x-foo' => 'Bar'));
|
||||
$this->drupalGet($url);
|
||||
$headers = $this->drupalGetHeaders();
|
||||
$this->assertEqual($headers['x-foo'], 'Bar', 'Found header set by file_test module on private download.');
|
||||
$this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.');
|
||||
// Ensure hook_file_download is fired correctly.
|
||||
$hooks_results = file_test_get_all_calls();
|
||||
$file_uri = !empty($hooks_results['download']) ? reset($hooks_results['download'][0]) : '';
|
||||
$this->assertEqual($file->uri, $file_uri);
|
||||
|
||||
// Test that the file transferred correctly.
|
||||
$this->assertEqual($contents, $this->content, 'Contents of the file are correct.');
|
||||
|
@ -2631,9 +2636,23 @@ class FileDownloadTest extends FileTestCase {
|
|||
$this->assertResponse(403, 'Correctly denied access to a file when file_test sets the header to -1.');
|
||||
|
||||
// Try non-existent file.
|
||||
file_test_reset();
|
||||
$url = file_create_url('private://' . $this->randomName());
|
||||
$this->drupalHead($url);
|
||||
$this->assertResponse(404, 'Correctly returned 404 response for a non-existent file.');
|
||||
// Assert that hook_file_download is not called.
|
||||
$hooks_results = file_test_get_all_calls();
|
||||
$hook_download_results = isset($hooks_results['download']) ? $hooks_results['download'] : NULL;
|
||||
$this->assertEqual(array(), $hook_download_results);
|
||||
|
||||
// Try requesting the private file url without a file specified.
|
||||
file_test_reset();
|
||||
$this->drupalGet('system/files');
|
||||
$this->assertResponse(404, 'Correctly returned 404 response for a private file url without a file specified.');
|
||||
// Assert that hook_file_download is not called.
|
||||
$hooks_results = file_test_get_all_calls();
|
||||
$hook_download_results = isset($hooks_results['download']) ? $hooks_results['download'] : NULL;
|
||||
$this->assertEqual(array(), $hook_download_results);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ core = 7.x
|
|||
files[] = file_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -768,6 +768,109 @@ class FormValidationTestCase extends DrupalWebTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests validation of additional Form API properties.
|
||||
*
|
||||
* Limited to maxlength validation at present.
|
||||
*/
|
||||
class FormsElementsValidationTestCase extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Form element validation - misc',
|
||||
'description' => 'Tests miscellaneous form element validation mechanisms.',
|
||||
'group' => 'Form API',
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('form_test');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests #maxlength validation.
|
||||
*/
|
||||
public function testMaxlengthValidation() {
|
||||
$max_length = 5;
|
||||
// The field types that support #maxlength.
|
||||
$form = array(
|
||||
'textfield' => array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => 'Textfield',
|
||||
'#required' => FALSE,
|
||||
'#maxlength' => $max_length,
|
||||
),
|
||||
'password' => array(
|
||||
'#type' => 'password',
|
||||
'#title' => 'Password',
|
||||
'#maxlength' => $max_length,
|
||||
),
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'textfield' => $this->randomString($max_length + 1),
|
||||
'password' => $this->randomString($max_length + 1),
|
||||
);
|
||||
list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit);
|
||||
$this->assertFalse(empty($errors), 'Form with overly long inputs returned errors.');
|
||||
$this->assertTrue(isset($errors['textfield']) && strpos($errors['textfield'], 'cannot be longer than') !== FALSE, 'Long input error in textfield.');
|
||||
$this->assertTrue(isset($errors['password']) && strpos($errors['password'], 'cannot be longer than') !== FALSE, 'Long input error in password.');
|
||||
|
||||
// This test for NULL inputs cannot be performed using the drupalPost() method.
|
||||
$edit['textfield'] = NULL;
|
||||
$edit['password'] = NULL;
|
||||
list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit);
|
||||
$this->assertTrue(empty($errors), 'Form with NULL inputs did not return errors.');
|
||||
|
||||
$edit['textfield'] = $this->randomString($max_length);
|
||||
$edit['password'] = $this->randomString($max_length);
|
||||
list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit);
|
||||
$this->assertTrue(empty($errors), 'Form with maxlength inputs did not return errors.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for the option check test to submit a form while collecting errors.
|
||||
*
|
||||
* Copied from FormsElementsTableSelectFunctionalTest.
|
||||
*
|
||||
* @param $form_element
|
||||
* A form element to test.
|
||||
* @param $edit
|
||||
* An array containing post data.
|
||||
*
|
||||
* @return
|
||||
* An array containing the processed form, the form_state and any errors.
|
||||
*/
|
||||
private function formSubmitHelper($form, $edit) {
|
||||
$form_id = $this->randomName();
|
||||
$form_state = form_state_defaults();
|
||||
|
||||
$form['op'] = array('#type' => 'submit', '#value' => t('Submit'));
|
||||
|
||||
$form_state['input'] = $edit;
|
||||
$form_state['input']['form_id'] = $form_id;
|
||||
|
||||
// The form token CSRF protection should not interfere with this test,
|
||||
// so we bypass it by marking this test form as programmed.
|
||||
$form_state['programmed'] = TRUE;
|
||||
|
||||
drupal_prepare_form($form_id, $form, $form_state);
|
||||
|
||||
drupal_process_form($form_id, $form, $form_state);
|
||||
|
||||
$errors = form_get_errors();
|
||||
|
||||
// Clear errors and messages.
|
||||
drupal_get_messages();
|
||||
form_clear_error();
|
||||
|
||||
// Return the processed form together with form_state and errors
|
||||
// to allow the caller lowlevel access to the form.
|
||||
return array($form, $form_state, $errors);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test form element labels, required markers and associated output.
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -73,6 +73,7 @@ class PasswordHashingTest extends DrupalWebTestCase {
|
|||
$result = user_hash_password($password);
|
||||
$this->assertFalse(empty($result), '510 byte long password is allowed.');
|
||||
$password .= 'xx';
|
||||
$result = user_hash_password($password);
|
||||
$this->assertFalse(empty($result), '512 byte long password is allowed.');
|
||||
$password = str_repeat('€', 171);
|
||||
$result = user_hash_password($password);
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ core = 7.x
|
|||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ core = 7.x
|
|||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue