Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding test for delete + groups in ApcEngine

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