updated core to 7.58

This commit is contained in:
2018-04-24 14:08:28 +02:00
parent 2c2dd76ece
commit 870831757c
140 changed files with 664 additions and 396 deletions

View File

@@ -76,7 +76,7 @@ class DrupalAlterTestCase extends DrupalWebTestCase {
class CommonURLUnitTest extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'URL generation tests',
'name' => 'URL generation unit tests',
'description' => 'Confirm that url(), drupal_get_query_parameters(), drupal_http_build_query(), and l() work correctly with various input.',
'group' => 'System',
);
@@ -372,6 +372,38 @@ class CommonURLUnitTest extends DrupalWebTestCase {
}
}
/**
* Web tests for URL generation functions.
*/
class CommonURLWebTest extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'URL generation web tests',
'description' => 'Confirm that URL-generating functions work correctly on specific site paths.',
'group' => 'System',
);
}
function setUp() {
parent::setUp('common_test');
}
/**
* Tests the url() function on internal paths which mimic external URLs.
*/
function testInternalPathMimicsExternal() {
// Ensure that calling url(current_path()) on "/http://example.com" (an
// internal path which mimics an external URL) always links to the internal
// path, not the external URL. This helps protect against external URL link
// injection vulnerabilities.
variable_set('common_test_link_to_current_path', TRUE);
$this->drupalGet('/http://example.com');
$this->clickLink('link which should point to the current path');
$this->assertUrl('/http://example.com');
$this->assertText('link which should point to the current path');
}
}
/**
* Tests url_is_external().
*/