Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test for deleting kwys under a group in MemcacheEngine

  • Loading branch information...
commit d0f7842f3663cfce51ffbbff1ea9a73568a08d8e 1 parent 411bd85
@lorenzo lorenzo authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
View
18 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
@@ -433,4 +433,22 @@ public function testGroupReadWrite() {
$this->assertTrue(Cache::write('test_groups', 'value3', 'memcache_groups'));
$this->assertEquals('value3', Cache::read('test_groups', 'memcache_groups'));
}
+
+/**
+ * Tests that deleteing from a groups-enabled config is possible
+ *
+ * @return void
+ */
+ public function testGroupDelete() {
+ Cache::config('memcache_groups', array(
+ 'engine' => 'Memcache',
+ 'duration' => 3600,
+ 'groups' => array('group_a', 'group_b')
+ ));
+ $this->assertTrue(Cache::write('test_groups', 'value', 'memcache_groups'));
+ $this->assertEquals('value', Cache::read('test_groups', 'memcache_groups'));
+ $this->assertTrue(Cache::delete('test_groups', 'memcache_groups'));
+
+ $this->assertFalse(Cache::read('test_groups', 'memcache_groups'));
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.