Skip to content

Commit

Permalink
Add test for cache instances and group config
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota committed Jun 26, 2016
1 parent 977ad6b commit be4cebe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/TestCase/Cache/CacheTest.php
Expand Up @@ -353,6 +353,24 @@ public function testGroupConfigs()
$this->assertEquals(['archive' => ['archive', 'page']], $result);
}

/**
* testGroupConfigsWithCacheInstance method
*/
public function testGroupConfigsWithCacheInstance()
{
Cache::drop('test');
$cache = new FileEngine();
$cache->init([
'duration' => 300,
'engine' => 'File',
'groups' => ['users', 'comments'],
]);
Cache::config('cached', $cache);

$result = Cache::groupConfigs('users');
$this->assertEquals(['users' => ['cached']], $result);
}

/**
* testGroupConfigsThrowsException method
* @expectedException \InvalidArgumentException
Expand Down

0 comments on commit be4cebe

Please sign in to comment.