Index: tests/phpunit/tests/post/getPages.php
===================================================================
--- tests/phpunit/tests/post/getPages.php	(revision 25967)
+++ tests/phpunit/tests/post/getPages.php	(working copy)
@@ -2,6 +2,7 @@
 
 /**
  * @group post
+ * @group get_pages
  */
 
 class Tests_Post_getPages extends WP_UnitTestCase {
@@ -9,6 +10,23 @@
 		parent::setUp();
 	}
 
+	function test_hierarchical() {
+		$pages = $this->factory->post->create_many( 2, array( 'post_type' => 'page' ) );
+
+		// Make the first post a child of the second
+		wp_update_post( array(
+			'ID'     => $pages[0],
+			'post_parent' => $pages[1],
+		) );
+
+		$got_pages = get_pages();
+
+		// Now the second post should be in front of the first
+		$this->assertEquals( $pages[0], $got_pages[1]->ID );
+		$this->assertEquals( $pages[1], $got_pages[0]->ID );
+
+	}
+
 	/**
 	 * @ticket 23167
 	 */
