Skip to content
This repository
Browse code

Adding test for delete + groups in ApcEngine

  • Loading branch information...
commit ae34c64fa36ff9ac95b0e481c89dba396ca7dc78 1 parent 3c9c3ef
José Lorenzo Rodríguez authored March 25, 2012
14  lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php
@@ -222,4 +222,18 @@ public function testGroupsReadWrite() {
222 222
 		$this->assertTrue(Cache::write('test_groups', 'value3', 'apc_groups'));
223 223
 		$this->assertEquals('value3', Cache::read('test_groups', 'apc_groups'));
224 224
 	}
  225
+
  226
+/**
  227
+ * Tests that deleteing from a groups-enabled config is possible
  228
+ *
  229
+ * @return void
  230
+ */
  231
+	public function testGroupDelete() {
  232
+		Cache::config('apc_groups', array('engine' => 'Apc', 'duration' => 0, 'groups' => array('group_a', 'group_b')));
  233
+		$this->assertTrue(Cache::write('test_groups', 'value', 'apc_groups'));
  234
+		$this->assertEquals('value', Cache::read('test_groups', 'apc_groups'));
  235
+		$this->assertTrue(Cache::delete('test_groups', 'apc_groups'));
  236
+
  237
+		$this->assertFalse(Cache::read('test_groups', 'apc_groups'));
  238
+	}
225 239
 }

0 notes on commit ae34c64

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