mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding tests for Cache not generating errors when Cache.disable = true. Refs #286
This commit is contained in:
parent
3f667eb412
commit
6ccc43d776
1 changed files with 21 additions and 4 deletions
|
@ -68,6 +68,23 @@ class CacheTest extends CakeTestCase {
|
|||
$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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue