diff --git a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
new file mode 100644
index 0000000..a3cd7ea
--- /dev/null
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\KernelTests\Core\Path\PathValidatorTest.
+ */
+
+namespace Drupal\KernelTests\Core\Path;
+
+use Drupal\Core\Url;
+use Drupal\entity_test\Entity\EntityTest;
+use Drupal\KernelTests\KernelTestBase;
+use Drupal\user\Entity\User;
+
+/**
+ * Tests the path validator.
+ *
+ * @group Path
+ *
+ * @see \Drupal\Core\Path\PathValidator
+ */
+class PathValidatorTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['path', 'entity_test', 'user'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->installEntitySchema('entity_test');
+  }
+
+  public function testGetUrlIfValidWithoutAccessCheck() {
+    $requestContext = \Drupal::service('router.request_context');
+    $pathValidator = \Drupal::service('path.validator');
+
+    $entity = EntityTest::create([
+      'name' => 'test',
+    ]);
+    $entity->save();
+
+    $methods = [
+      'POST',
+      'GET',
+      'PUT',
+      'PATCH',
+      'DELETE',
+      NULL, // used in cli context
+    ];
+    foreach ($methods as $method) {
+      $requestContext->setMethod($method);
+      /** @var Url $url */
+      $url = $pathValidator->getUrlIfValidWithoutAccessCheck($entity->toUrl()->toString());
+      $this->assertEquals($method, $requestContext->getMethod());
+      $this->assertInstanceOf(Url::class, $url);
+      $this->assertSame($url->getRouteParameters(), ['entity_test' => $entity->id()]);
+    }
+  }
+
+}
