diff --git tests/phpunit/tests/theme/themeDir.php tests/phpunit/tests/theme/themeDir.php
index 2cab375..5136c83 100644
--- tests/phpunit/tests/theme/themeDir.php
+++ tests/phpunit/tests/theme/themeDir.php
@@ -293,4 +293,21 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
 		rmdir( WP_CONTENT_DIR . '/themes/foo' );
 		rmdir( WP_CONTENT_DIR . '/themes/foo-themes' );
 	}
+
+	/**
+	 * @ticket 43228
+	 */
+	function test_theme_dir_caches() {
+		@mkdir( WP_CONTENT_DIR . '/themes/foo' );
+		@mkdir( WP_CONTENT_DIR . '/themes/foo/bar' );
+
+		$roots = get_theme_roots();
+
+		register_theme_directory( WP_CONTENT_DIR . '/themes/foo' );
+
+		$this->assertNotEquals( get_theme_roots(), $roots );
+
+		rmdir( WP_CONTENT_DIR . '/themes/foo/bar' );
+		rmdir( WP_CONTENT_DIR . '/themes/foo' );
+	}
 }
