diff --git a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
index d703f9d..9d01d45 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php
@@ -173,6 +173,29 @@ function testInsertSelectFields() {
   }

   /**
+   * Tests that the INSERT INTO ... SELECT (fields) ... with ORDER BY.
+   */
+  function testInsertSelectFieldsOrderby() {
+    $query = db_select('test', 't')
+      ->fields('t', array('name', 'job', 'age'))
+      ->condition('t.name', 'John')
+      ->orderBy('t.id');
+
+    // The resulting query should be equivalent to:
+    // INSERT INTO test_people (age, name, job)
+    // SELECT t.age AS age, t.name AS name, t.job AS job
+    // FROM test t
+    // WHERE t.name = 'John'
+    // ORDER BY t.id
+    db_insert('test_people')
+      ->from($query)
+      ->execute();
+
+    $saved_age = db_query('SELECT age FROM {test_people} WHERE name = :name', array(':name' => 'John'))->fetchField();
+    $this->assertIdentical($saved_age, '25', 'Can retrieve after inserting.');
+  }
+
+  /**
    * Tests that the INSERT INTO ... SELECT * ... syntax works.
    */
   function testInsertSelectAll() {
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
index b524863..ddd1fa3 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php
@@ -323,6 +323,19 @@ function testUnionCount() {
   }

   /**
+   * Tests that we can ORDER BY a column that is not in SELECT.
+   */
+  function testOrderbyColumnNotInSelect() {
+    $ordered_names = db_select('test', 't')
+      ->fields('t', array('name'))
+      ->orderBy('t.age')
+      ->execute()
+      ->fetchCol();
+
+    $this->assertEqual($ordered_names, ['John', 'Paul', 'George', 'Ringo'], 'A query with ordering names in the correct order, where the ordering column is not in the select.');
+  }
+
+  /**
    * Tests that random ordering of queries works.
    *
    * We take the approach of testing the Drupal layer only, rather than trying
