CacheBehaviorTestCase::testCacheDisable PHP Method

testCacheDisable() public method

public testCacheDisable ( )
    function testCacheDisable()
    {
        Cache::drop('config');
        Configure::write('Cache.disable', true);
        $this->CacheData->Behaviors->attach('Other');
        $this->CacheData->find('all', array('cacher' => 'keyexists'));
        $result = $this->CacheData->Behaviors->Other->_dbconfig;
        $expected = 'test';
        $this->assertEquals($result, $expected);
        // make sure it doesn't hit the beforeFind callback
        $result = $this->CacheData->Behaviors->Other->_queryData['cacher'];
        $expected = 'keyexists';
        $this->assertEquals($result, $expected);
    }