diff --git a/tests/phpunit/tests/post/getPostStatus.php b/tests/phpunit/tests/post/getPostStatus.php
new file mode 100644
index 0000000000..32befe0e7a
--- /dev/null
+++ b/tests/phpunit/tests/post/getPostStatus.php
@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * @group post
+ */
+class Tests_Post_GetPostStatus extends WP_UnitTestCase {
+
+	/**
+	 * Array of post IDs.
+	 *
+	 * @var int[]
+	 */
+	public static $post_ids;
+
+	public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
+		$post_statuses = array( 'publish', 'future', 'draft', 'auto-draft', 'trash' );
+		foreach ( $post_statuses as $post_status ) {
+			$date = '';
+			if ( 'future' === $post_status ) {
+				$date = strftime( '%Y-%m-%d %H:%M:%S', strtotime( '+1 year' ) );
+			}
+
+			self::$post_ids[ $post_status ] = $factory->post->create(
+				array(
+					'post_status' => 'trash' === $post_status ? 'publish' : $post_status,
+					'post_date'   => $date,
+					'post_name'   => "$post_status-post",
+				)
+			);
+
+			// Attachments without media.
+			self::$post_ids[ "$post_status-attachment" ] = $factory->attachment->create_object(
+				array(
+					'post_parent' => self::$post_ids[ $post_status ],
+					'post_status' => 'inherit',
+					'post_name'   => "$post_status-attachment",
+					'post_date'   => $date,
+				)
+			);
+
+			// Attachments without parent or media.
+			self::$post_ids[ "$post_status-attachment-no-parent" ] = $factory->attachment->create_object(
+				array(
+					'post_status' => 'trash' === $post_status ? 'publish' : $post_status,
+					'post_name'   => "$post_status-attachment-no-parent",
+					'post_date'   => $date,
+				)
+			);
+		}
+
+		// Attachment with incorrect parent ID.
+		self::$post_ids['badly-parented-attachment'] = $factory->attachment->create_object(
+			array(
+				'post_parent' => PHP_INT_MAX,
+				'post_status' => 'inherit',
+				'post_name'   => "$post_status-attachment",
+				'post_date'   => $date,
+			)
+		);
+
+		// Trash the trash post and attachment.
+		wp_trash_post( self::$post_ids['trash'] );
+		wp_trash_post( self::$post_ids['trash-attachment-no-parent'] );
+	}
+
+	/**
+	 * Ensure `get_post_status()` resolves correctly for posts and attachments.
+	 *
+	 * @ticket 52326
+	 * @dataProvider data_get_post_status_resolves
+	 *
+	 * @param string $post_key The post key in self::$post_ids.
+	 * @param string $expected The expected get_post_status() return value.
+	 */
+	public function test_get_post_status_resolves( $post_key, $expected ) {
+		$this->assertSame( $expected, get_post_status( self::$post_ids[ $post_key ] ) );
+	}
+
+	/**
+	 * Data provider for test_get_post_status_resolves().
+	 *
+	 * @return array {
+	 *     @type string $post_key The post key in self::$post_ids.
+	 *     @type string $expected The expected get_post_status() return value.
+	 * }
+	 */
+	public function data_get_post_status_resolves() {
+		return array(
+			array( 'publish', 'publish' ),
+			array( 'future', 'future' ),
+			array( 'draft', 'draft' ),
+			array( 'auto-draft', 'auto-draft' ),
+			array( 'trash', 'trash' ),
+
+			// Attachment with `inherit` status from parent.
+			array( 'publish-attachment', 'publish' ),
+			array( 'future-attachment', 'future' ),
+			array( 'draft-attachment', 'draft' ),
+			array( 'auto-draft-attachment', 'auto-draft' ),
+			array( 'trash-attachment', 'publish' ),
+
+			// Attachment with native status (rather than inheriting from parent).
+			array( 'publish-attachment-no-parent', 'publish' ),
+			array( 'future-attachment-no-parent', 'future' ),
+			array( 'draft-attachment-no-parent', 'draft' ),
+			array( 'auto-draft-attachment-no-parent', 'auto-draft' ),
+			array( 'trash-attachment-no-parent', 'trash' ),
+
+			// Attachment attempting to inherit from an invalid parent number.
+			array( 'badly-parented-attachment', 'publish' ),
+		);
+	}
+}
