Index: tests/ms.php
===================================================================
--- tests/ms.php	(revision 1203)
+++ tests/ms.php	(working copy)
@@ -11,6 +11,57 @@
 
 	protected $plugin_hook_count = 0;
 
+	/**
+	 * @ticket 22917
+	 */
+	function test_enable_live_network_blog_counts_filter() {
+		$blogcountstart = get_blog_count();
+		add_filter( 'enable_live_network_blog_counts', __return_false ); //false by default as of 3.6
+		$blog_ids = $this->factory->blog->create_many( 4 );
+
+		$this->assertEquals( $blogcountstart, (int) get_blog_count() ); //count only updated when cron runs, so likely unchanged
+		
+		add_filter( 'enable_live_network_blog_counts', __return_true ); //turns on live updating
+		$blog_ids = $this->factory->blog->create_many( 4 );
+
+		$this->assertEquals( $blogcountstart+9, (int) get_blog_count() ); //count should be updated
+
+		//clean up
+		add_filter( 'enable_live_network_blog_counts', __return_false ); //turns on live updating
+		foreach ( $blog_ids as $blog_id ) {
+			wpmu_delete_blog( $blog_id, true );
+		}
+	}
+
+	/**
+	 * @ticket 22917
+	 */
+	function test_enable_live_network_user_counts_filter() {
+		add_filter( 'enable_live_network_user_counts', __return_false ); //false by default as of 3.6
+		// Refresh the cache
+		wp_update_network_counts();
+		$start_count = get_user_count();
+
+		wpmu_create_user( 'user', 'pass', 'email' );
+
+		$count = get_user_count(); // No change, cache not refreshed
+		$this->assertEquals( $start_count, $count );
+		
+		//start over with filter on
+		wp_update_network_counts();
+		$start_count = get_user_count();
+
+		add_filter( 'enable_live_network_user_counts', __return_true ); //turns on live updating
+		
+		wpmu_create_user( 'user2', 'pass2', 'email2' );
+
+		$count = get_user_count();
+		$this->assertEquals( $start_count + 1, $count );
+
+		//turn filter back off
+		add_filter( 'enable_live_network_user_counts', __return_false ); //false by default as of 3.6
+	}
+
 	function test_create_and_delete_blog() {
 		global $wpdb;
 
