diff --git a/core/modules/system/lib/Drupal/system/Tests/System/PageNotFoundTest.php b/core/modules/system/lib/Drupal/system/Tests/System/PageNotFoundTest.php
index b248ff7..b3d7a69 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/PageNotFoundTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/PageNotFoundTest.php
@@ -35,6 +35,12 @@ function testPageNotFound() {
     $this->drupalGet($this->randomName(10));
     $this->assertText(t('Page not found'), 'Found the default 404 page');
 
+    // Test some invalid ids
+    $this->drupalGet('node/invalid');
+    $this->assertResponse(404);
+    $this->drupalGet('user/invalid');
+    $this->assertResponse(404);
+
     // Use a custom 404 page.
     $edit = array(
       'site_404' => 'user/' . $this->admin_user->id(),
