diff --git a/modules/simpletest/tests/cache.test b/modules/simpletest/tests/cache.test
index 954f575..0831b76 100644
--- a/modules/simpletest/tests/cache.test
+++ b/modules/simpletest/tests/cache.test
@@ -334,6 +334,37 @@ class CacheClearCase extends CacheTestCase {
 }
 
 /**
+ * Test that clearing a cache bin does invalidate items in other bins.
+ *
+ * @see http://drupal.org/node/1079518
+ */
+class CacheNotClearingAllCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Incorrect cache invalidation test',
+      'description' => 'Test that clearing one cache bin does not invalidate items in another.',
+      'group' => 'Cache'
+    );
+  }
+
+  function setUp() {
+    parent::setUp('cache_test');
+  }
+
+  function testNotClearingAll() {
+    $this->drupalGet('cache_test/dsm_on_set');
+    $this->assertRaw('Cache was unset', t('Cache was unset as expected before setting'));
+    $this->drupalGet('cache_test/dsm_on_set');
+    $this->assertNoRaw('Cache was unset', t('Cache was set as expected after setting'));
+    $this->drupalGet('cache_test/clear_other_bin');
+    // Sleep for at least two seconds to cause a timestamp offset
+    usleep(2000000);
+    $this->drupalGet('cache_test/dsm_on_set');
+    $this->assertNoRaw('Cache was unset', t('Cached item in one bin was not affected by clearing of other cache bin'));
+  }
+}
+
+/**
  * Test cache_is_empty() function.
  */
 class CacheIsEmptyCase extends CacheTestCase {
diff --git a/modules/simpletest/tests/cache_test.info b/modules/simpletest/tests/cache_test.info
new file mode 100644
index 0000000..4d903ee
--- /dev/null
+++ b/modules/simpletest/tests/cache_test.info
@@ -0,0 +1,6 @@
+name = "Cache Test"
+description = "Support module for cache tests."
+package = Testing
+version = VERSION
+core = 7.x
+hidden = TRUE
diff --git a/modules/simpletest/tests/cache_test.module b/modules/simpletest/tests/cache_test.module
new file mode 100644
index 0000000..b54c62e
--- /dev/null
+++ b/modules/simpletest/tests/cache_test.module
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @file
+ * Helper module for the cache tests.
+ */
+
+/**
+ * Implements hook_menu().
+ */
+function cache_test_menu() {
+  $items = array();
+  $items['cache_test/dsm_on_set'] = array(
+    'title' => 'DSM on set',
+    'page callback' => 'cache_test_dsm_on_set',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );
+  $items['cache_test/clear_other_bin'] = array(
+    'title' => 'Clear other bin',
+    'page callback' => 'cache_test_clear_other_bin',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );
+  return $items;
+}
+
+function cache_test_dsm_on_set() {
+  if (!cache_get('cache_test_foo', 'cache')) {
+    cache_set('cache_test_foo', 'bar', 'cache', time() + 600);
+    return 'Cache was unset';
+  }
+  else {
+    return 'Cache was set';
+  }
+}
+
+function cache_test_clear_other_bin() {
+  cache_clear_all(NULL, 'cache_block');
+}
\ No newline at end of file
