Adding failing test case for invalid cache config causing a fatal error

This commit is contained in:
AD7six 2009-08-03 18:17:20 +02:00
parent 33370fdc60
commit 47d50b1d93

View file

@ -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
*