Commit de473408 authored by webchick's avatar webchick

Issue #1742958 by DamienMcKenna, jhodgdon: Fixed All spellings of URI should be uppercase.

parent 5d616120
...@@ -18,7 +18,7 @@ function authorize_filetransfer_form($form, &$form_state) { ...@@ -18,7 +18,7 @@ function authorize_filetransfer_form($form, &$form_state) {
global $base_url, $is_https; global $base_url, $is_https;
$form = array(); $form = array();
// If possible, we want to post this form securely via https. // If possible, we want to post this form securely via HTTPS.
$form['#https'] = TRUE; $form['#https'] = TRUE;
// Get all the available ways to transfer files. // Get all the available ways to transfer files.
......
...@@ -433,7 +433,7 @@ function conf_path($require_settings = TRUE, $reset = FALSE) { ...@@ -433,7 +433,7 @@ function conf_path($require_settings = TRUE, $reset = FALSE) {
* The hostname and optional port number, e.g. "www.example.com" or * The hostname and optional port number, e.g. "www.example.com" or
* "www.example.com:8080". * "www.example.com:8080".
* @param $script_name * @param $script_name
* The part of the url following the hostname, including the leading slash. * The part of the URL following the hostname, including the leading slash.
* @param $require_settings * @param $require_settings
* Defaults to TRUE. If TRUE, then only match directories with a * Defaults to TRUE. If TRUE, then only match directories with a
* 'settings.php' file. Otherwise match any directory. * 'settings.php' file. Otherwise match any directory.
...@@ -768,7 +768,7 @@ function drupal_settings_initialize() { ...@@ -768,7 +768,7 @@ function drupal_settings_initialize() {
} }
else { else {
// Otherwise use $base_url as session name, without the protocol // Otherwise use $base_url as session name, without the protocol
// to use the same session identifiers across http and https. // to use the same session identifiers across HTTP and HTTPS.
list( , $session_name) = explode('://', $base_url, 2); list( , $session_name) = explode('://', $base_url, 2);
// HTTP_HOST can be modified by a visitor, but we already sanitized it // HTTP_HOST can be modified by a visitor, but we already sanitized it
// in drupal_settings_initialize(). // in drupal_settings_initialize().
......
...@@ -448,7 +448,7 @@ function drupal_get_query_parameters(array $query = NULL, array $exclude = array ...@@ -448,7 +448,7 @@ function drupal_get_query_parameters(array $query = NULL, array $exclude = array
* The query string to split. * The query string to split.
* *
* @return * @return
* An array of url decoded couples $param_name => $value. * An array of URL decoded couples $param_name => $value.
*/ */
function drupal_get_query_array($query) { function drupal_get_query_array($query) {
$result = array(); $result = array();
...@@ -2086,7 +2086,7 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) { ...@@ -2086,7 +2086,7 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) {
* for the URL. If $options['language'] is omitted, the language will be * for the URL. If $options['language'] is omitted, the language will be
* obtained from language(LANGUAGE_TYPE_URL). * obtained from language(LANGUAGE_TYPE_URL).
* - 'https': Whether this URL should point to a secure location. If not * - 'https': Whether this URL should point to a secure location. If not
* defined, the current scheme is used, so the user stays on http or https * defined, the current scheme is used, so the user stays on HTTP or HTTPS
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can * respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can
* only be enforced when the variable 'https' is set to TRUE. * only be enforced when the variable 'https' is set to TRUE.
* - 'base_url': Only used internally, to modify the base URL when a language * - 'base_url': Only used internally, to modify the base URL when a language
......
...@@ -464,8 +464,8 @@ function file_create_url($uri) { ...@@ -464,8 +464,8 @@ function file_create_url($uri) {
} }
} }
elseif ($scheme == 'http' || $scheme == 'https') { elseif ($scheme == 'http' || $scheme == 'https') {
// Check for http so that we don't have to implement getExternalUrl() for // Check for HTTP so that we don't have to implement getExternalUrl() for
// the http wrapper. // the HTTP wrapper.
return $uri; return $uri;
} }
else { else {
......
...@@ -4154,7 +4154,7 @@ function form_type_range_value($element, $input = FALSE) { ...@@ -4154,7 +4154,7 @@ function form_type_range_value($element, $input = FALSE) {
} }
/** /**
* Returns HTML for a url form element. * Returns HTML for a URL form element.
* *
* @param $variables * @param $variables
* An associative array containing: * An associative array containing:
......
...@@ -2087,7 +2087,7 @@ function theme_item_list($variables) { ...@@ -2087,7 +2087,7 @@ function theme_item_list($variables) {
* *
* @param $variables * @param $variables
* An associative array containing: * An associative array containing:
* - url: The url for the link. * - url: The URL for the link.
*/ */
function theme_more_help_link($variables) { function theme_more_help_link($variables) {
return '<div class="more-help-link">' . l(t('More help'), $variables['url']) . '</div>'; return '<div class="more-help-link">' . l(t('More help'), $variables['url']) . '</div>';
...@@ -2152,7 +2152,7 @@ function theme_html_tag($variables) { ...@@ -2152,7 +2152,7 @@ function theme_html_tag($variables) {
* *
* @param $variables * @param $variables
* An associative array containing: * An associative array containing:
* - url: The url of the main page. * - url: The URL of the main page.
* - title: A descriptive verb for the link, like 'Read more'. * - title: A descriptive verb for the link, like 'Read more'.
*/ */
function theme_more_link($variables) { function theme_more_link($variables) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* *
* This service is dependent on the 'request' service and can therefore pass the * This service is dependent on the 'request' service and can therefore pass the
* Request object to the code that deals with each particular language type. * Request object to the code that deals with each particular language type.
* This means the Request can be used directly for things like url-based * This means the Request can be used directly for things like URL-based
* language negotiation. * language negotiation.
*/ */
class LanguageManager { class LanguageManager {
......
...@@ -342,7 +342,7 @@ public function stream_close() { ...@@ -342,7 +342,7 @@ public function stream_close() {
* Support for unlink(). * Support for unlink().
* *
* @param string $uri * @param string $uri
* A string containing the uri to the resource to delete. * A string containing the URI to the resource to delete.
* *
* @return bool * @return bool
* TRUE if resource was successfully deleted. * TRUE if resource was successfully deleted.
...@@ -358,9 +358,9 @@ public function unlink($uri) { ...@@ -358,9 +358,9 @@ public function unlink($uri) {
* Support for rename(). * Support for rename().
* *
* @param string $from_uri, * @param string $from_uri,
* The uri to the file to rename. * The URI to the file to rename.
* @param string $to_uri * @param string $to_uri
* The new uri for file. * The new URI for file.
* *
* @return bool * @return bool
* TRUE if file was successfully renamed. * TRUE if file was successfully renamed.
......
...@@ -15,7 +15,7 @@ function CollapsibleFieldset(node, settings) { ...@@ -15,7 +15,7 @@ function CollapsibleFieldset(node, settings) {
settings settings
); );
// Expand fieldset if there are errors inside, or if it contains an // Expand fieldset if there are errors inside, or if it contains an
// element that is targeted by the uri fragment identifier. // element that is targeted by the URI fragment identifier.
var anchor = location.hash && location.hash !== '#' ? ', ' + location.hash : ''; var anchor = location.hash && location.hash !== '#' ? ', ' + location.hash : '';
if (this.$node.find('.error' + anchor).length) { if (this.$node.find('.error' + anchor).length) {
this.$node.removeClass('collapsed'); this.$node.removeClass('collapsed');
......
...@@ -173,7 +173,7 @@ function comment_node_type_load($name) { ...@@ -173,7 +173,7 @@ function comment_node_type_load($name) {
} }
/** /**
* Entity uri callback. * Entity URI callback.
*/ */
function comment_uri(Comment $comment) { function comment_uri(Comment $comment) {
return array( return array(
......
...@@ -94,7 +94,7 @@ function config_test_entity_info() { ...@@ -94,7 +94,7 @@ function config_test_entity_info() {
} }
/** /**
* Entity uri callback. * Entity URI callback.
* *
* @param Drupal\config_test\ConfigTest $config_test * @param Drupal\config_test\ConfigTest $config_test
* A ConfigTest entity. * A ConfigTest entity.
......
...@@ -275,7 +275,7 @@ private function doUser() { ...@@ -275,7 +275,7 @@ private function doUser() {
// View the database log page-not-found report page. // View the database log page-not-found report page.
$this->drupalGet('admin/reports/page-not-found'); $this->drupalGet('admin/reports/page-not-found');
$this->assertResponse(200); $this->assertResponse(200);
// Check that full-length url displayed. // Check that full-length URL displayed.
$this->assertText($not_found_url, t('DBLog event was recorded: [page not found]')); $this->assertText($not_found_url, t('DBLog event was recorded: [page not found]'));
} }
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
* if a higher level persistent cache is available for the entity type. * if a higher level persistent cache is available for the entity type.
* Defaults to TRUE. * Defaults to TRUE.
* - uri callback: A function taking an entity as argument and returning the * - uri callback: A function taking an entity as argument and returning the
* uri elements of the entity, e.g. 'path' and 'options'. The actual entity * URI elements of the entity, e.g. 'path' and 'options'. The actual entity
* uri can be constructed by passing these elements to url(). * URI can be constructed by passing these elements to url().
* - label callback: (optional) A function taking an entity and optional langcode * - label callback: (optional) A function taking an entity and optional langcode
* argument, and returning the label of the entity. If langcode is omitted, the * argument, and returning the label of the entity. If langcode is omitted, the
* entity's default language is used. * entity's default language is used.
......
...@@ -1198,7 +1198,7 @@ function theme_image_style($variables) { ...@@ -1198,7 +1198,7 @@ function theme_image_style($variables) {
$variables['width'] = $dimensions['width']; $variables['width'] = $dimensions['width'];
$variables['height'] = $dimensions['height']; $variables['height'] = $dimensions['height'];
// Determine the url for the styled image. // Determine the URL for the styled image.
$variables['uri'] = image_style_url($variables['style_name'], $variables['uri']); $variables['uri'] = image_style_url($variables['style_name'], $variables['uri']);
return theme('image', $variables); return theme('image', $variables);
} }
......
...@@ -265,7 +265,7 @@ function language_from_url($languages, $request) { ...@@ -265,7 +265,7 @@ function language_from_url($languages, $request) {
foreach ($languages as $language) { foreach ($languages as $language) {
// Skip the check if the language doesn't have a domain. // Skip the check if the language doesn't have a domain.
if (!empty($domains[$language->langcode])) { if (!empty($domains[$language->langcode])) {
// Ensure that there is exactly one protocol in the url when checking // Ensure that there is exactly one protocol in the URL when checking
// the hostname. // the hostname.
$host = 'http://' . str_replace(array('http://', 'https://'), '', $domains[$language->langcode]); $host = 'http://' . str_replace(array('http://', 'https://'), '', $domains[$language->langcode]);
$host = parse_url($host, PHP_URL_HOST); $host = parse_url($host, PHP_URL_HOST);
......
...@@ -52,7 +52,7 @@ class LanguageUILanguageNegotiationTest extends WebTestBase { ...@@ -52,7 +52,7 @@ class LanguageUILanguageNegotiationTest extends WebTestBase {
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'UI language negotiation', 'name' => 'UI language negotiation',
'description' => 'Test UI language switching by url path prefix and domain.', 'description' => 'Test UI language switching by URL path prefix and domain.',
'group' => 'Language', 'group' => 'Language',
); );
} }
...@@ -434,21 +434,21 @@ function testLanguageDomain() { ...@@ -434,21 +434,21 @@ function testLanguageDomain() {
$italian_url = url('admin', array('language' => $languages['it'], 'script' => '')); $italian_url = url('admin', array('language' => $languages['it'], 'script' => ''));
$url_scheme = ($is_https) ? 'https://' : 'http://'; $url_scheme = ($is_https) ? 'https://' : 'http://';
$correct_link = $url_scheme . $link; $correct_link = $url_scheme . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right url (@url) in accordance with the chosen language', array('@url' => $italian_url))); $this->assertTrue($italian_url == $correct_link, t('The url() function returns the right URL (@url) in accordance with the chosen language', array('@url' => $italian_url)));
// Test https via options. // Test HTTPS via options.
variable_set('https', TRUE); variable_set('https', TRUE);
$italian_url = url('admin', array('https' => TRUE, 'language' => $languages['it'], 'script' => '')); $italian_url = url('admin', array('https' => TRUE, 'language' => $languages['it'], 'script' => ''));
$correct_link = 'https://' . $link; $correct_link = 'https://' . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right https url (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url))); $this->assertTrue($italian_url == $correct_link, t('The url() function returns the right HTTPS URL (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
variable_set('https', FALSE); variable_set('https', FALSE);
// Test https via current url scheme. // Test HTTPS via current URL scheme.
$temp_https = $is_https; $temp_https = $is_https;
$is_https = TRUE; $is_https = TRUE;
$italian_url = url('admin', array('language' => $languages['it'], 'script' => '')); $italian_url = url('admin', array('language' => $languages['it'], 'script' => ''));
$correct_link = 'https://' . $link; $correct_link = 'https://' . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right url (via current url scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url))); $this->assertTrue($italian_url == $correct_link, t('The url() function returns the right URL (via current URL scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
$is_https = $temp_https; $is_https = $temp_https;
} }
} }
...@@ -28,7 +28,7 @@ class Gettext { ...@@ -28,7 +28,7 @@ class Gettext {
* @param string $langcode * @param string $langcode
* Language code string. * Language code string.
* @param array $files * @param array $files
* List of file objects with uri properties pointing to read. * List of file objects with URI properties pointing to read.
* *
* @return array * @return array
* Structured array as produced by a PoMemoryWriter. * Structured array as produced by a PoMemoryWriter.
...@@ -52,7 +52,7 @@ static function filesToArray($langcode, array $files) { ...@@ -52,7 +52,7 @@ static function filesToArray($langcode, array $files) {
* Reads the given PO files into the database. * Reads the given PO files into the database.
* *
* @param stdClass $file * @param stdClass $file
* File object with an uri property pointing at the file's path. * File object with an URI property pointing at the file's path.
* *
* @param array $options * @param array $options
* An array with options that can have the following elements: * An array with options that can have the following elements:
......
...@@ -24,7 +24,7 @@ class LocalePathTest extends WebTestBase { ...@@ -24,7 +24,7 @@ class LocalePathTest extends WebTestBase {
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Path language settings', 'name' => 'Path language settings',
'description' => 'Checks you can configure a language for individual url aliases.', 'description' => 'Checks you can configure a language for individual URL aliases.',
'group' => 'Locale', 'group' => 'Locale',
); );
} }
......
...@@ -281,7 +281,7 @@ function node_field_display_node_alter(&$display, $context) { ...@@ -281,7 +281,7 @@ function node_field_display_node_alter(&$display, $context) {
} }
/** /**
* Entity uri callback. * Entity URI callback.
* *
* @param Drupal\node\Node $node * @param Drupal\node\Node $node
* A node entity. * A node entity.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* - $date: Formatted creation date. Preprocess functions can reformat it by * - $date: Formatted creation date. Preprocess functions can reformat it by
* calling format_date() with the desired parameters on the $created variable. * calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username(). * - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node. * - $node_url: Direct URL of the current node.
* - $display_submitted: Whether submission information should be displayed. * - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during * - $submitted: Submission information created from $name and $date during
* template_preprocess_node(). * template_preprocess_node().
......
...@@ -347,7 +347,7 @@ Drupal.overlay.setFocusBefore = function ($element, document) { ...@@ -347,7 +347,7 @@ Drupal.overlay.setFocusBefore = function ($element, document) {
* Check if the given link is in the administrative section of the site. * Check if the given link is in the administrative section of the site.
* *
* @param url * @param url
* The url to be tested. * The URL to be tested.
* *
* @return boolean * @return boolean
* TRUE if the URL represents an administrative link, FALSE otherwise. * TRUE if the URL represents an administrative link, FALSE otherwise.
...@@ -382,7 +382,7 @@ Drupal.overlay.isAdminLink = function (url) { ...@@ -382,7 +382,7 @@ Drupal.overlay.isAdminLink = function (url) {
* Determine whether a link is external to the site. * Determine whether a link is external to the site.
* *
* @param url * @param url
* The url to be tested. * The URL to be tested.
* *
* @return boolean * @return boolean
* TRUE if the URL is external to the site, FALSE otherwise. * TRUE if the URL is external to the site, FALSE otherwise.
...@@ -571,7 +571,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { ...@@ -571,7 +571,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
var target = $target[0]; var target = $target[0];
var href = target.href; var href = target.href;
// Only handle links that have an href attribute and use the http(s) protocol. // Only handle links that have an href attribute and use the HTTP(S) protocol.
if (typeof href !== 'undefined' && href !== '' && (/^https?\:/).test(target.protocol)) { if (typeof href !== 'undefined' && href !== '' && (/^https?\:/).test(target.protocol)) {
var anchor = href.replace(target.ownerDocument.location.href, ''); var anchor = href.replace(target.ownerDocument.location.href, '');
// Skip anchor links. // Skip anchor links.
......
...@@ -138,7 +138,7 @@ function testAttributesInMarkupFile() { ...@@ -138,7 +138,7 @@ function testAttributesInMarkupFile() {
$image = current($this->drupalGetTestFiles('image')); $image = current($this->drupalGetTestFiles('image'));
// Create an array for drupalPost with the field names as the keys and // Create an array for drupalPost with the field names as the keys and
// the uris for the test files as the values. // the URIs for the test files as the values.
$edit = array("files[" . $field_name . "_" . $langcode . "_0]" => drupal_realpath($file->uri), $edit = array("files[" . $field_name . "_" . $langcode . "_0]" => drupal_realpath($file->uri),
"files[" . $image_field . "_" . $langcode . "_0]" => drupal_realpath($image->uri)); "files[" . $image_field . "_" . $langcode . "_0]" => drupal_realpath($image->uri));
......
...@@ -816,8 +816,8 @@ protected function curlInitialize() { ...@@ -816,8 +816,8 @@ protected function curlInitialize() {
CURLOPT_URL => $base_url, CURLOPT_URL => $base_url,
CURLOPT_FOLLOWLOCATION => FALSE, CURLOPT_FOLLOWLOCATION => FALSE,
CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https. CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on HTTPS.
CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https. CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on HTTPS.
CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'), CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
CURLOPT_USERAGENT => $this->databasePrefix, CURLOPT_USERAGENT => $this->databasePrefix,
); );
...@@ -1828,10 +1828,10 @@ protected function getAbsoluteUrl($path) { ...@@ -1828,10 +1828,10 @@ protected function getAbsoluteUrl($path) {
} }
/** /**
* Get the current url from the cURL handler. * Get the current URL from the cURL handler.
* *
* @return * @return
* The current url. * The current URL.
*/ */
protected function getUrl() { protected function getUrl() {
return $this->url; return $this->url;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
*/ */
function hook_simpletest_alter(&$groups) { function hook_simpletest_alter(&$groups) {
// An alternative session handler module would not want to run the original // An alternative session handler module would not want to run the original
// Session https handling test because it checks the sessions table in the // Session HTTPS handling test because it checks the sessions table in the
// database. // database.
unset($groups['Session']['testHttpsSession']); unset($groups['Session']['testHttpsSession']);
} }
......
...@@ -43,12 +43,12 @@ function testBasicFeedAddNoTitle() { ...@@ -43,12 +43,12 @@ function testBasicFeedAddNoTitle() {
'output_url' => url($path, array('absolute' => TRUE)), 'output_url' => url($path, array('absolute' => TRUE)),
'title' => '', 'title' => '',
), ),
'external url without title' => array( 'external URL without title' => array(
'input_url' => $external_url, 'input_url' => $external_url,
'output_url' => $external_url, 'output_url' => $external_url,
'title' => '', 'title' => '',
), ),
'local url without title' => array( 'local URL without title' => array(
'input_url' => $fully_qualified_local_url, 'input_url' => $fully_qualified_local_url,
'output_url' => $fully_qualified_local_url, 'output_url' => $fully_qualified_local_url,
'title' => '', 'title' => '',
...@@ -58,12 +58,12 @@ function testBasicFeedAddNoTitle() { ...@@ -58,12 +58,12 @@ function testBasicFeedAddNoTitle() {
'output_url' => url($path_for_title, array('absolute' => TRUE)), 'output_url' => url($path_for_title, array('absolute' => TRUE)),
'title' => $this->randomName(12), 'title' => $this->randomName(12),
), ),
'external url with title' => array( 'external URL with title' => array(
'input_url' => $external_for_title, 'input_url' => $external_for_title,
'output_url' => $external_for_title, 'output_url' => $external_for_title,
'title' => $this->randomName(12), 'title' => $this->randomName(12),
), ),
'local url with title' => array( 'local URL with title' => array(
'input_url' => $fully_qualified_for_title, 'input_url' => $fully_qualified_for_title,
'output_url' => $fully_qualified_for_title, 'output_url' => $fully_qualified_for_title,
'title' => $this->randomName(12), 'title' => $this->randomName(12),
...@@ -84,7 +84,7 @@ function testBasicFeedAddNoTitle() { ...@@ -84,7 +84,7 @@ function testBasicFeedAddNoTitle() {
* Create a pattern representing the RSS feed in the page. * Create a pattern representing the RSS feed in the page.
*/ */
function urlToRSSLinkPattern($url, $title = '') { function urlToRSSLinkPattern($url, $title = '') {
// Escape any regular expression characters in the url ('?' is the worst). // Escape any regular expression characters in the URL ('?' is the worst).
$url = preg_replace('/([+?.*])/', '[$0]', $url); $url = preg_replace('/([+?.*])/', '[$0]', $url);
$generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%'; $generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%';
return $generated_pattern; return $generated_pattern;
......
...@@ -22,7 +22,7 @@ public static function getInfo() { ...@@ -22,7 +22,7 @@ public static function getInfo() {
} }
/** /**
* Test valid absolute urls. * Test valid absolute URLs.
*/ */
function testValidAbsolute() { function testValidAbsolute() {
$url_schemes = array('http', 'https', 'ftp'); $url_schemes = array('http', 'https', 'ftp');
...@@ -51,13 +51,13 @@ function testValidAbsolute() { ...@@ -51,13 +51,13 @@ function testValidAbsolute() {
foreach ($valid_absolute_urls as $url) { foreach ($valid_absolute_urls as $url) {
$test_url = $scheme . '://' . $url; $test_url = $scheme . '://' . $url;
$valid_url = valid_url($test_url, TRUE); $valid_url = valid_url($test_url, TRUE);
$this->assertTrue($valid_url, t('@url is a valid url.', array('@url' => $test_url))); $this->assertTrue($valid_url, t('@url is a valid URL.', array('@url' => $test_url)));
} }
} }
} }
/** /**
* Test invalid absolute urls. * Test invalid absolute URLs.
*/ */
function testInvalidAbsolute() { function testInvalidAbsolute() {
$url_schemes = array('http', 'https', 'ftp'); $url_schemes = array('http', 'https', 'ftp');
...@@ -71,13 +71,13 @@ function testInvalidAbsolute() { ...@@ -71,13 +71,13 @@ function testInvalidAbsolute() {
foreach ($invalid_ablosule_urls as $url) { foreach ($invalid_ablosule_urls as $url) {
$test_url = $scheme . '://' . $url; $test_url = $scheme . '://' . $url;
$valid_url = valid_url($test_url, TRUE); $valid_url = valid_url($test_url, TRUE);
$this->assertFalse($valid_url, t('@url is NOT a valid url.', array('@url' => $test_url))); $this->assertFalse($valid_url, t('@url is NOT a valid URL.', array('@url' => $test_url)));
} }
} }