Skip to content

Commit

Permalink
Test case for DboSource::flushMethodCache
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiupruteanu committed Oct 1, 2013
1 parent f416a32 commit dd3b1e4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
Expand Up @@ -683,6 +683,22 @@ public function testNameMethodCacheCollisions() {
$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
*
Expand Down

0 comments on commit dd3b1e4

Please sign in to comment.