diff --git a/test/unit/storage/sfCacheSessionStorageTest.php b/test/unit/storage/sfCacheSessionStorageTest.php index ba54439ce..2e2329b11 100644 --- a/test/unit/storage/sfCacheSessionStorageTest.php +++ b/test/unit/storage/sfCacheSessionStorageTest.php @@ -20,15 +20,14 @@ sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); +// setup cache +$temp = tempnam('/tmp/cache_dir', 'tmp'); +unlink($temp); +mkdir($temp); + $plan = 8; $t = new lime_test($plan); -if (!ini_get('apc.enable_cli')) { - $t->skip('APC must be enable on CLI to run these tests', $plan); - - return; -} - // initialize the storage try { $storage = new sfCacheSessionStorage(); @@ -37,7 +36,7 @@ $t->pass('->__construct() throws an exception when not provided a cache option'); } -$storage = new sfCacheSessionStorage(array('cache' => array('class' => 'sfAPCCache', 'param' => array()))); +$storage = new sfCacheSessionStorage(array('cache' => array('class' => 'sfFileCache', 'param' => array('cache_dir' => $temp)))); $t->ok($storage instanceof sfStorage, '->__construct() is an instance of sfStorage'); $storage->write('test', 123); @@ -63,3 +62,7 @@ // shutdown the storage $storage->shutdown(); + +// clean up cache +sfToolkit::clearDirectory($temp); +rmdir($temp);