Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
68859414
Commit
68859414
authored
Jul 10, 2012
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1645156
follow-up by attiks: More robust handling of HTTP_HOST override in test.
parent
eae31f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
core/modules/language/lib/Drupal/language/Tests/LanguageUrlRewritingTest.php
...ge/lib/Drupal/language/Tests/LanguageUrlRewritingTest.php
+5
-0
No files found.
core/modules/language/lib/Drupal/language/Tests/LanguageUrlRewritingTest.php
View file @
68859414
...
...
@@ -99,6 +99,8 @@ function testDomainNameNegotiationPort() {
drupal_static_reset
(
'language_url_outbound_alter'
);
drupal_static_reset
(
'language_url_rewrite_url'
);
// Remember current HTTP_HOST.
$http_host
=
$_SERVER
[
'HTTP_HOST'
];
// Fake a different port.
$_SERVER
[
'HTTP_HOST'
]
.
=
':88'
;
...
...
@@ -107,6 +109,9 @@ function testDomainNameNegotiationPort() {
$url
=
url
(
''
,
array
(
'absolute'
=>
TRUE
,
'language'
=>
$language
));
$this
->
assertTrue
(
strcmp
(
$url
,
'http://example.fr:88/'
)
==
0
,
'The right port is used.'
);
// Restore HTTP_HOST.
$_SERVER
[
'HTTP_HOST'
]
=
$http_host
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment