Commit 853741a8 authored by alexpott's avatar alexpott

Issue #2350543 by Schnitzel: Fixed #2343943 introduced gethostname(), which breaks on new testbot .

parent b35d190d
......@@ -391,6 +391,11 @@ function testUrlLanguageFallback() {
* Tests _url() when separate domains are used for multiple languages.
*/
function testLanguageDomain() {
global $base_url;
// Get the current host URI we're running on.
$base_url_host = parse_url($base_url, PHP_URL_HOST);
// Add the Italian language.
ConfigurableLanguage::createFromLangcode('it')->save();
......@@ -415,7 +420,7 @@ function testLanguageDomain() {
// Change the domain for the Italian language.
$edit = array(
'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN,
'domain[en]' => gethostname(),
'domain[en]' => $base_url_host,
'domain[it]' => 'it.example.com',
);
$this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration'));
......
......@@ -98,10 +98,13 @@ private function checkUrl($language, $message1, $message2) {
* Check URL rewriting when using a domain name and a non-standard port.
*/
function testDomainNameNegotiationPort() {
global $base_url;
$language_domain = 'example.fr';
// Get the current host URI we're running on.
$base_url_host = parse_url($base_url, PHP_URL_HOST);
$edit = array(
'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN,
'domain[en]' => gethostname(),
'domain[en]' => $base_url_host,
'domain[fr]' => $language_domain
);
$this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment