Skip to content
This repository
Browse code

Added test for deleting kwys under a group in MemcacheEngine

  • Loading branch information...
commit d0f7842f3663cfce51ffbbff1ea9a73568a08d8e 1 parent 411bd85
José Lorenzo Rodríguez authored
18  lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
@@ -433,4 +433,22 @@ public function testGroupReadWrite() {
433 433
 		$this->assertTrue(Cache::write('test_groups', 'value3', 'memcache_groups'));
434 434
 		$this->assertEquals('value3', Cache::read('test_groups', 'memcache_groups'));
435 435
 	}
  436
+
  437
+/**
  438
+ * Tests that deleteing from a groups-enabled config is possible
  439
+ *
  440
+ * @return void
  441
+ */
  442
+	public function testGroupDelete() {
  443
+		Cache::config('memcache_groups', array(
  444
+			'engine' => 'Memcache',
  445
+			'duration' => 3600,
  446
+			'groups' => array('group_a', 'group_b')
  447
+		));
  448
+		$this->assertTrue(Cache::write('test_groups', 'value', 'memcache_groups'));
  449
+		$this->assertEquals('value', Cache::read('test_groups', 'memcache_groups'));
  450
+		$this->assertTrue(Cache::delete('test_groups', 'memcache_groups'));
  451
+
  452
+		$this->assertFalse(Cache::read('test_groups', 'memcache_groups'));
  453
+	}
436 454
 }

0 notes on commit d0f7842

Please sign in to comment.
Something went wrong with that request. Please try again.