Index: tests/ms.php
===================================================================
--- tests/ms.php	(revision 1043)
+++ tests/ms.php	(working copy)
@@ -19,6 +19,17 @@
 			$this->assertInternalType( 'int', $blog_id );
 			$prefix = $wpdb->get_blog_prefix( $blog_id );
 
+			$details = get_blog_details( $blog_id, false );
+			$this->assertEquals( $blog_id, get_id_from_blogname( $details->path ) );
+			$this->assertEquals( $blog_id, wp_cache_get( 'get_id_from_blogname_' . trim( $details->path, '/' ), 'blog-details' ) );
+			$this->assertEquals( $details, wp_cache_get( $blog_id . 'short', 'blog-details' ) );
+			$this->assertEquals( false, wp_cache_get( $blog_id, 'blog-details' ) );
+			$key = md5( $details->domain . $details->path );
+			$this->assertEquals( false, wp_cache_get( $key, 'blog-lookup' ) );
+			$details = get_blog_details( $blog_id, true );
+			$this->assertEquals( $details, wp_cache_get( $blog_id, 'blog-details' ) );
+			$this->assertEquals( $details, wp_cache_get( $key, 'blog-lookup' ) );
+
 			foreach ( $wpdb->tables( 'blog', false ) as $table ) {
 				$wpdb->suppress_errors();
 				$table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" );
@@ -41,8 +52,15 @@
 		foreach ( $blog_ids as $blog_id ) {
 			// drop tables for every second blog
 			$drop_tables = ! $drop_tables;
+			$details = get_blog_details( $blog_id, false );
 			wpmu_delete_blog( $blog_id, $drop_tables );
 
+			$this->assertEquals( false, wp_cache_get( 'get_id_from_blogname_' . trim( $details->path, '/' ), 'blog-details' ) );
+			$this->assertEquals( false, wp_cache_get( $blog_id, 'blog-details' ) );
+			$this->assertEquals( false, wp_cache_get( $blog_id . 'short', 'blog-details' ) );
+			$key = md5( $details->domain . $details->path );
+			$this->assertEquals( false, wp_cache_get( $key, 'blog-lookup' ) );
+
 			$prefix = $wpdb->get_blog_prefix( $blog_id );
 			foreach ( $wpdb->tables( 'blog', false ) as $table ) {
 				$wpdb->suppress_errors();
Index: includes/factory.php
===================================================================
--- includes/factory.php	(revision 1043)
+++ includes/factory.php	(working copy)
@@ -97,11 +97,11 @@
 class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
 
 	function __construct( $factory = null ) {
-		global $current_site;
+		global $current_site, $base;
 		parent::__construct( $factory );
 		$this->default_generation_definitions = array(
 			'domain' => $current_site->domain,
-			'path' => new WP_UnitTest_Generator_Sequence( 'testpath%s' ),
+			'path' => new WP_UnitTest_Generator_Sequence( $base . 'testpath%s' ),
 			'title' => new WP_UnitTest_Generator_Sequence( 'Site %s' ),
 			'site_id' => $current_site->id,
 		);
