Permalink
Browse files

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

  • Loading branch information...
1 parent 33370fd commit 47d50b1d93edae7a1d4698de9f7999bf887f26aa AD7six committed Aug 3, 2009
Showing with 20 additions and 0 deletions.
  1. +20 −0 cake/tests/cases/libs/cache.test.php
@@ -78,6 +78,26 @@ function testConfig() {
}
/**
+ * 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
*
* @access public

0 comments on commit 47d50b1

Please sign in to comment.