mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding failing test case for invalid cache config causing a fatal error
This commit is contained in:
parent
33370fdc60
commit
47d50b1d93
1 changed files with 20 additions and 0 deletions
|
@ -77,6 +77,26 @@ class CacheTest extends CakeTestCase {
|
|||
$this->assertEqual($results, Cache::config('new'));
|
||||
}
|
||||
|
||||
/**
|
||||
* testInvalidConfig method
|
||||
*
|
||||
* Test that the cache class doesn't cause fatal errors with a partial path
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function testInvaidConfig() {
|
||||
Cache::config('Invalid', array(
|
||||
'engine' => 'File',
|
||||
'duration' => '+1 year',
|
||||
'prefix' => 'testing_invalid_',
|
||||
'path' => 'data/',
|
||||
'serialize' => true
|
||||
));
|
||||
$read = Cache::read('Test', 'Invalid');
|
||||
$this->assertEqual($read, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* testConfigChange method
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue