Test case for DboSource::flushMethodCache

This commit is contained in:
ovidiupruteanu 2013-10-01 21:34:40 +03:00
parent f416a321c7
commit dd3b1e41bc

View file

@ -683,6 +683,22 @@ class DboSourceTest extends CakeTestCase {
$this->assertEquals($expected, $result);
}
/**
* Test that flushMethodCache works as expected
*
* @return void
*/
public function testFlushMethodCache() {
$this->testDb->cacheMethods = true;
$this->testDb->cacheMethod('name','some-key','stuff');
Cache::write('method_cache', DboTestSource::$methodCache, '_cake_core_');
$this->testDb->flushMethodCache();
$result = $this->testDb->cacheMethod('name','some-key');
$this->assertNull($result);
}
/**
* testLog method
*