Index: tests/cache.php
===================================================================
--- tests/cache.php	(revision 935)
+++ tests/cache.php	(working copy)
@@ -53,6 +53,176 @@
 		$this->assertEquals( '', $this->cache->get($key) );
 	}
 
+	function test_get_multi_single_with_bad_key() {
+		$key = rand_str();
+		$this->assertFalse( $this->cache->get_multi( $key ) );
+	}
+
+	function test_get_multi_single_with_bad_key_and_group() {
+		$key = rand_str();
+		$group = rand_str();
+		$this->assertFalse( $this->cache->get_multi( $key, $group ) );
+	}
+
+	function test_get_multi_single_value_no_group() {
+		$key = rand_str();
+		$val = rand_str();
+
+		$this->assertTrue( $this->cache->set( $key, $val ) );
+
+		$values = $this->cache->get_multi( $key );
+		$this->assertSame( $val, $values[ 'default' ][ $key ] );
+	}
+
+	function test_get_multi_single_value_single_group() {
+		$key = rand_str();
+		$val = rand_str();
+
+		$group = rand_str();
+
+		$this->assertTrue( $this->cache->set( $key, $val, $group ) );
+
+		$values = $this->cache->get_multi( $key, $group );
+		$this->assertSame( $val, $values[ $group ][ $key ] );
+	}
+
+	function test_get_multi_many_values_with_no_group() {
+		$vals_with_keys = array();
+
+		for ( $i = 0; $i < 5; $i++ ) {
+			$rand = rand_str();
+			$vals_with_keys[ $rand ] = rand_str();
+		}
+
+		foreach ( $vals_with_keys as $key => $val )
+			$this->assertTrue( $this->cache->set( $key, $val ) );
+
+		$gets = $this->cache->get_multi( array_keys( $vals_with_keys ) );
+
+		// Verify array type
+		$this->assertContainsOnly( 'array', $gets );
+
+		// Verify individual values
+		foreach ( $gets as $group => $key_value ) {
+			foreach ( $key_value as $key => $value ) {
+				$this->assertSame( $vals_with_keys[ $key ], $value );
+			}
+		}
+	}
+
+	function test_get_multi_many_values_with_single_group() {
+		$vals_with_keys = array();
+		$group = rand_str();
+
+		for ( $i = 0; $i < 5; $i++ ) {
+			$rand = rand_str();
+			$vals_with_keys[ $rand ] = rand_str();
+		}
+
+		// Verify sets
+		foreach ( $vals_with_keys as $key => $val )
+			$this->assertTrue( $this->cache->set( $key, $val, $group ) );
+
+		// Verify accessible by normal get
+		foreach ( $vals_with_keys as $key => $val )
+			$this->assertSame( $val, $this->cache->get( $key, $group ) );
+
+		$gets = $this->cache->get_multi( array_keys( $vals_with_keys ), $group );
+
+		// Verify array type
+		$this->assertContainsOnly( 'array', $gets );
+
+		// Verify individual values
+		foreach ( $gets as $group => $key_value ) {
+			foreach ( $key_value as $key => $value ) {
+				$this->assertSame( $vals_with_keys[ $key ], $value );
+			}
+		}
+	}
+
+	function test_get_multi_many_values_with_unique_groups() {
+		$vals_with_keys_and_groups = array();
+		$keys = array();
+		$groups = array();
+
+		for ( $i = 0; $i < 5; $i++ ) {
+			$key = rand_str();
+			$group = rand_str();
+			$vals_with_keys_and_groups[ $group ][ $key ] = rand_str();
+
+			$keys[] = $key;
+			$groups[] = $group;
+		}
+
+		// Verify sets
+		foreach ( $vals_with_keys_and_groups as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $value ) {
+				$this->assertTrue( $this->cache->set( $key, $value, $group ) );
+			}
+		}
+
+		// Verify accessible by normal get
+		foreach ( $vals_with_keys_and_groups as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $value ) {
+				$this->assertSame( $vals_with_keys_and_groups[ $group ][ $key ], $this->cache->get( $key, $group ) );
+			}
+		}
+
+		$gets = $this->cache->get_multi( $keys, $groups );
+
+		// Verify array type
+		$this->assertContainsOnly( 'array', $gets );
+
+		// Verify individual values
+		foreach ( $gets as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $val ) {
+				$this->assertSame( $vals_with_keys_and_groups[ $group ][ $key ], $val );
+			}
+		}
+	}
+
+	function test_get_multi_many_values_with_unique_and_default_groups() {
+		$vals_with_keys_and_groups = array();
+		$keys = array();
+		$groups = array();
+
+		for ( $i = 0; $i < 5; $i++ ) {
+			$key = rand_str();
+			$group = $i < 3 ? rand_str() : 'default';
+
+			$vals_with_keys_and_groups[ $group ][ $key ] = rand_str();
+
+			$keys[] = $key;
+			$groups[] = $group;
+		}
+
+		// Verify sets
+		foreach ( $vals_with_keys_and_groups as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $value ) {
+				$this->assertTrue( $this->cache->set( $key, $value, $group ) );
+			}
+		}
+
+		// Verify accessible by normal get
+		foreach ( $vals_with_keys_and_groups as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $value ) {
+				$this->assertSame( $vals_with_keys_and_groups[ $group ][ $key ], $this->cache->get( $key, $group ) );
+			}
+		}
+
+		$gets = $this->cache->get_multi( $keys, $groups );
+
+		// Verify array type
+		$this->assertContainsOnly( 'array', $gets );
+
+		// Verify individual values
+		foreach ( $gets as $group => $val_with_key ) {
+			foreach ( $val_with_key as $key => $val ) {
+				$this->assertSame( $vals_with_keys_and_groups[ $group ][ $key ], $val );
+			}
+		}
+	}
+
 	function test_add() {
 		$key = rand_str();
 		$val1 = rand_str();
@@ -221,4 +391,4 @@
 
 		$this->assertFalse( wp_cache_delete( $key, 'default') );
 	}
-}
+}
\ No newline at end of file
