reverted:
--- b/core/modules/rest/src/Tests/AuthTest.php
+++ a/core/modules/rest/src/Tests/AuthTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\rest\Tests;
 
-use Drupal\Core\Url;
 use Drupal\rest\Tests\RESTTestBase;
 
 /**
@@ -88,7 +87,7 @@
     $out = $this->curlExec(
       array(
         CURLOPT_HTTPGET => TRUE,
+        CURLOPT_URL => _url($path, array('absolute' => TRUE)),
-        CURLOPT_URL => Url::fromUri('base://' . $path, array('absolute' => TRUE))->toString(),
         CURLOPT_NOBODY => FALSE,
         CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
         CURLOPT_USERPWD => $username . ':' . $password,
