mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-29 13:12:57 +00:00
Test case for DboSource::flushMethodCache
This commit is contained in:
parent
f416a321c7
commit
dd3b1e41bc
1 changed files with 16 additions and 0 deletions
|
@ -683,6 +683,22 @@ class DboSourceTest extends CakeTestCase {
|
||||||
$this->assertEquals($expected, $result);
|
$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
|
* testLog method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue