diff --git a/src/Display/DisplayInterface.php b/src/Display/DisplayInterface.php
index 2b6d8c52..9eaf8c0c 100644
--- a/src/Display/DisplayInterface.php
+++ b/src/Display/DisplayInterface.php
@@ -42,12 +42,12 @@ public function getDescription();
   public function getIndex();
 
   /**
-   * Returns the URL of this display.
+   * Returns the base path used by this display.
    *
-   * @return \Drupal\Core\Url|null
-   *   The URL of the display, or NULL if there is no specific URL for it.
+   * @return string|null
+   *   The base path for this display, or NULL if there is none.
    */
-  public function getUrl();
+  public function getPath();
 
   /**
    * Returns true if the display is being rendered in the current request.
diff --git a/src/Display/DisplayPluginBase.php b/src/Display/DisplayPluginBase.php
index f9553c46..61c82c03 100644
--- a/src/Display/DisplayPluginBase.php
+++ b/src/Display/DisplayPluginBase.php
@@ -5,7 +5,6 @@
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Path\CurrentPathStack;
 use Drupal\Core\Plugin\PluginBase;
-use Drupal\Core\Url;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -134,10 +133,10 @@ public function getIndex() {
   /**
    * {@inheritdoc}
    */
-  public function getUrl() {
+  public function getPath() {
     $plugin_definition = $this->getPluginDefinition();
     if (!empty($plugin_definition['path'])) {
-      return Url::fromUserInput($plugin_definition['path']);
+      return $plugin_definition['path'];
     }
     return NULL;
   }
@@ -146,10 +145,9 @@ public function getUrl() {
    * {@inheritdoc}
    */
   public function isRenderedInCurrentRequest() {
-    $plugin_definition = $this->getPluginDefinition();
-    if (!empty($plugin_definition['path'])) {
-      $current_path = $this->getCurrentPath()->getPath();
-      return $current_path == $plugin_definition['path'];
+    $display_path = $this->getPath();
+    if ($display_path) {
+      return $this->getCurrentPath()->getPath() === $display_path;
     }
     return FALSE;
   }
diff --git a/src/Plugin/search_api/display/ViewsBlock.php b/src/Plugin/search_api/display/ViewsBlock.php
index acfa87b2..49c90ea5 100644
--- a/src/Plugin/search_api/display/ViewsBlock.php
+++ b/src/Plugin/search_api/display/ViewsBlock.php
@@ -16,14 +16,6 @@ class ViewsBlock extends ViewsDisplayBase {
   /**
    * {@inheritdoc}
    */
-  public function getUrl() {
-    // Blocks don't have a path, so don't return one.
-    return NULL;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function isRenderedInCurrentRequest() {
     // There is no way to know if a block is embedded on a page, because
     // blocks can be rendered in isolation (see big_pipe, esi, ...). To be
diff --git a/tests/src/Functional/ViewsTest.php b/tests/src/Functional/ViewsTest.php
index 73f32282..5d6b1481 100644
--- a/tests/src/Functional/ViewsTest.php
+++ b/tests/src/Functional/ViewsTest.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Language\Language;
 use Drupal\Core\Session\UserSession;
 use Drupal\Core\Site\Settings;
-use Drupal\Core\Url;
 use Drupal\entity_test\Entity\EntityTestMulRevChanged;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\search_api\Entity\Index;
@@ -283,20 +282,18 @@ public function testView() {
     $this->checkResults($query, [], 'Search for results of no available datasource');
 
     // Make sure there was a display plugin created for this view.
-    $displays = \Drupal::getContainer()->get('plugin.manager.search_api.display')
+    $displays = \Drupal::getContainer()
+      ->get('plugin.manager.search_api.display')
       ->getInstances();
 
-    if ($displays === []) {
-      throw new SearchApiException("No displays are loaded, tests will fail.");
-    }
-
     $display_id = 'views_page:search_api_test_view__page_1';
-    $this->assertTrue(array_key_exists($display_id, $displays), 'A display plugin was created for the test view page display.');
-    $this->assertTrue(array_key_exists('views_block:search_api_test_view__block_1', $displays), 'A display plugin was created for the test view block display.');
-    $this->assertTrue(array_key_exists('views_rest:search_api_test_view__rest_export_1', $displays), 'A display plugin was created for the test view block display.');
-    $view_url = Url::fromUserInput('/search-api-test')->toString();
-    $this->assertEquals($view_url, $displays[$display_id]->getUrl()->toString(), 'Display returns the correct path.');
+    $this->assertArrayHasKey($display_id, $displays, 'A display plugin was created for the test view page display.');
+    $this->assertArrayHasKey('views_block:search_api_test_view__block_1', $displays, 'A display plugin was created for the test view block display.');
+    $this->assertArrayHasKey('views_rest:search_api_test_view__rest_export_1', $displays, 'A display plugin was created for the test view block display.');
+    $this->assertEquals('/search-api-test', $displays[$display_id]->getPath(), 'Display returns the correct path.');
     $this->assertEquals('database_search_index', $displays[$display_id]->getIndex()->id(), 'Display returns the correct search index.');
+    $this->assertNull($displays['views_block:search_api_test_view__block_1']->getPath(), 'Block display returns the correct path.');
+    $this->assertEquals('/search-api-rest-test', $displays['views_rest:search_api_test_view__rest_export_1']->getPath(), 'REST display returns the correct path.');
 
     $admin_user = $this->drupalCreateUser([
       'administer search_api',
@@ -314,9 +311,9 @@ public function testView() {
 
     $displays = \Drupal::getContainer()->get('plugin.manager.search_api.display')
       ->getInstances();
-    $this->assertFalse(array_key_exists('views_page:search_api_test_view__page_1', $displays), 'A display plugin was created for the test view page display.');
-    $this->assertTrue(array_key_exists('views_block:search_api_test_view__block_1', $displays), 'A display plugin was created for the test view block display.');
-    $this->assertTrue(array_key_exists('views_rest:search_api_test_view__rest_export_1', $displays), 'A display plugin was created for the test view block display.');
+    $this->assertArrayNotHasKey('views_page:search_api_test_view__page_1', $displays, 'No display plugin was created for the test view page display.');
+    $this->assertArrayHasKey('views_block:search_api_test_view__block_1', $displays, 'A display plugin was created for the test view block display.');
+    $this->assertArrayHasKey('views_rest:search_api_test_view__rest_export_1', $displays, 'A display plugin was created for the test view block display.');
   }
 
   /**
