Adding tests for Cache not generating errors when Cache.disable = true. Refs #286

This commit is contained in:
Mark Story 2010-02-13 18:51:39 -05:00
parent 3f667eb412
commit 6ccc43d776

View file

@ -68,6 +68,23 @@ class CacheTest extends CakeTestCase {
$this->assertTrue(isset($results['settings'])); $this->assertTrue(isset($results['settings']));
} }
/**
* Check that no fatal errors are issued doing normal things when Cache.disable is true.
*
* @return void
*/
function testNonFatalErrorsWithCachedisable() {
Configure::write('Cache.disable', true);
Cache::config('test', array('engine' => 'File', 'path' => TMP, 'prefix' => 'error_test_'));
Cache::write('no_save', 'Noooo!', 'test');
Cache::read('no_save', 'test');
Cache::delete('no_save', 'test');
Cache::set('duration', '+10 minutes');
Configure::write('Cache.disable', false);
}
/** /**
* test configuring CacheEngines in App/libs * test configuring CacheEngines in App/libs
* *