diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php index 15d50fd..9388c61 100644 --- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php @@ -463,27 +463,26 @@ function testLanguageDomain() { // Test URL in another language: http://it.example.com/admin. // Base path gives problems on the testbot, so $correct_link is hard-coded. // @see UrlAlterFunctionalTest::assertUrlOutboundAlter (path.test). - $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it'], 'absolute' => TRUE])->toString(); + $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString(); $url_scheme = \Drupal::request()->isSecure() ? 'https://' : 'http://'; $correct_link = $url_scheme . $link; - $this->assertEqual($italian_url, $correct_link, format_string('The _url() function returns the right URL (@url) in accordance with the chosen language', array('@url' => $italian_url))); + $this->assertEqual($italian_url, $correct_link, format_string('The Url::fromRoute() returns the right URL (@url) in accordance with the chosen language', array('@url' => $italian_url))); // Test HTTPS via options. $this->settingsSet('mixed_mode_sessions', TRUE); $this->rebuildContainer(); - $italian_url = Url::fromRoute('system.admin', [], ['https' => TRUE, 'language' => $languages['it'], 'absolute' => TRUE])->toString(); + $italian_url = Url::fromRoute('system.admin', [], ['https' => TRUE, 'language' => $languages['it']])->toString(); $correct_link = 'https://' . $link; - $this->assertTrue($italian_url == $correct_link, format_string('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, format_string('The Url::fromRoute() returns the right HTTPS URL (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url))); $this->settingsSet('mixed_mode_sessions', FALSE); // Test HTTPS via current URL scheme. $request = Request::create('', 'GET', array(), array(), array(), array('HTTPS' => 'on')); $this->container->get('request_stack')->push($request); - $generator = $this->container->get('url_generator'); - $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it'], 'absolute' => TRUE])->toString(); + $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString(); $correct_link = 'https://' . $link; - $this->assertTrue($italian_url == $correct_link, format_string('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, format_string('The Url::fromRoute() method returns the right URL (via current URL scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url))); } /** diff --git a/core/modules/system/src/Tests/Cache/PageCacheTagsIntegrationTest.php b/core/modules/system/src/Tests/Cache/PageCacheTagsIntegrationTest.php index 5a19b46..d2b348c 100644 --- a/core/modules/system/src/Tests/Cache/PageCacheTagsIntegrationTest.php +++ b/core/modules/system/src/Tests/Cache/PageCacheTagsIntegrationTest.php @@ -140,12 +140,12 @@ function testPageCacheTags() { */ protected function verifyPageCacheTags(Url $url, $expected_tags) { sort($expected_tags); - $this->drupalGet($url->toString()); + $this->drupalGet($url->setAbsolute()->toString()); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS'); $actual_tags = explode(' ', $this->drupalGetHeader('X-Drupal-Cache-Tags')); sort($actual_tags); $this->assertIdentical($actual_tags, $expected_tags); - $this->drupalGet($url->toString()); + $this->drupalGet($url->setAbsolute()->toString()); $actual_tags = explode(' ', $this->drupalGetHeader('X-Drupal-Cache-Tags')); sort($actual_tags); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');