Skip to content

Commit

Permalink
Adding failing test case for invalid cache config causing a fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Aug 3, 2009
1 parent 33370fd commit 47d50b1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cake/tests/cases/libs/cache.test.php
Expand Up @@ -77,6 +77,26 @@ function testConfig() {
$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
*
Expand Down

0 comments on commit 47d50b1

Please sign in to comment.