Permalink
Browse files

Add test for keyHashFunction option in the FileSystem driver, test fo…

…r success and for the exception.
  • Loading branch information...
1 parent 3f23ded commit e977ec9153bcc531349f9694132817d0591cd0c0 @pwhelan pwhelan committed Feb 19, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/Stash/Test/Driver/FileSystemTest.php
@@ -11,6 +11,8 @@
namespace Stash\Test\Driver;
+use Stash\Driver\FileSystem;
+
/**
* @package Stash
* @author Robert Hafner <tedivm@tedivm.com>
@@ -23,4 +25,17 @@ protected function getOptions()
{
return array('memKeyLimit' => 2);
}
+
+ /**
+ * @expectedException Stash\Exception\RuntimeException
+ */
+ public function testOptionKeyHashFunctionException()
+ {
+ $driver = new FileSystem(array('keyHashFunction' => 'foobar_'.mt_rand()));
+ }
+
+ public function testOptionKeyHashFunction()
+ {
+ $driver = new FileSystem(array('keyHashFunction' => 'md5'));
+ }
}

0 comments on commit e977ec9

Please sign in to comment.