Skip to content
Permalink
Browse files

Add extra test case for cache registry setter and update docblock.

  • Loading branch information...
dakota committed Sep 17, 2015
1 parent 219c872 commit 847cf2fd28273b166c86f45363e21e1d04e54655
Showing with 15 additions and 1 deletion.
  1. +1 −1 src/Cache/Cache.php
  2. +14 −0 tests/TestCase/Cache/CacheTest.php
@@ -118,7 +118,7 @@ class Cache
* Also allows for injecting of a new registry instance.
*
* @param \Cake\Core\ObjectRegistry $registry Injectable registry object.
* @return \Cake\Cache\CacheRegistry
* @return \Cake\Core\ObjectRegistry
*/
public static function registry(ObjectRegistry $registry = null)
{
@@ -15,6 +15,7 @@
namespace Cake\Test\TestCase\Cache;
use Cake\Cache\Cache;
use Cake\Cache\CacheRegistry;
use Cake\Cache\Engine\FileEngine;
use Cake\Core\App;
use Cake\Core\Configure;
@@ -569,4 +570,17 @@ public function testRegistry()
{
$this->assertInstanceOf('Cake\Cache\CacheRegistry', Cache::registry());
}
/**
* test registry method setting
*
* @return void
*/
public function testRegistrySet()
{
$registry = new CacheRegistry();
Cache::registry($registry);
$this->assertSame($registry, Cache::registry());
}
}

0 comments on commit 847cf2f

Please sign in to comment.
You can’t perform that action at this time.