Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 47d50b1d93edae7a1d4698de9f7999bf887f26aa 1 parent 33370fd
@AD7six AD7six authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 cake/tests/cases/libs/cache.test.php
View
20 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
Please sign in to comment.
Something went wrong with that request. Please try again.