|
|
@@ -412,6 +412,32 @@ class FileEngineTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Test that clearing with repeat writes works properly
|
|
|
+ */
|
|
|
+ public function testClearingWithRepeatWrites() {
|
|
|
+ Cache::config('repeat', array(
|
|
|
+ 'engine' => 'File', 'groups' => array('users')
|
|
|
+ ));
|
|
|
+
|
|
|
+ $this->assertTrue(Cache::write('user', 'rchavik', 'repeat'));
|
|
|
+ $this->assertEquals('rchavik', Cache::read('user', 'repeat'));
|
|
|
+
|
|
|
+ Cache::delete('user', 'repeat');
|
|
|
+ $this->assertEquals(false, Cache::read('user', 'repeat'));
|
|
|
+
|
|
|
+ $this->assertTrue(Cache::write('user', 'ADmad', 'repeat'));
|
|
|
+ $this->assertEquals('ADmad', Cache::read('user', 'repeat'));
|
|
|
+
|
|
|
+ Cache::clearGroup('users', 'repeat');
|
|
|
+ $this->assertEquals(false, Cache::read('user', 'repeat'));
|
|
|
+
|
|
|
+ $this->assertTrue(Cache::write('user', 'markstory', 'repeat'));
|
|
|
+ $this->assertEquals('markstory', Cache::read('user', 'repeat'));
|
|
|
+
|
|
|
+ Cache::drop('repeat');
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Tests that deleting from a groups-enabled config is possible
|
|
|
*
|
|
|
* @return void
|