diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index e57e94212..ffe584d91 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -255,6 +255,23 @@ class FileEngineTest extends CakeTestCase { $FileTwo->clear(false); } +/** + * Test that clear() also removes files with group tags. + * + * @return void + */ + public function testClearWithGroups() { + $engine = new FileEngine(); + $engine->init(array( + 'prefix' => 'cake_test_', + 'duration' => DAY, + 'groups' => array('short') + )); + $engine->write('test_key', 'it works', DAY); + $engine->clear(false); + $this->assertFalse($engine->read('test_key'), 'Key should have been removed'); + } + /** * testKeyPath method *