Index: post.php
===================================================================
--- post.php	(revision 1293)
+++ post.php	(working copy)
@@ -492,6 +492,28 @@
 	}
 
 	/**
+	 * @ticket 13459
+	 */
+	function test_wp_unique_post_slug_across_post_types_if_permalink_is_only_postname() {
+
+		// change permalink structure to /%postname%/
+		global $wp_rewrite;
+		$wp_rewrite->set_permalink_structure('/%postname%/');
+		$wp_rewrite->flush_rules();
+
+		// create post and page with the exact same title
+		$page = $this->factory->post->create_and_get( array( 'post_title' => 'identical-title', 'post_type' => 'page' ) );
+		$post = $this->factory->post->create_and_get( array( 'post_title' => 'identical-title', 'post_type' => 'post' ) );
+
+		// expect them to have different slugs, avoiding URL conflict
+		$this->assertNotEquals( $post->post_name, $page->post_name );
+
+		// clean up
+		$wp_rewrite->set_permalink_structure('');
+
+	}
+
+	/**
 	 * @ticket 15665
 	 */
 	function test_get_page_by_path_priority() {
