File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 19
19
20
20
sfConfig::set ('sf_symfony_lib_dir ' , realpath ($ _test_dir .'/../lib ' ));
21
21
22
+ // setup cache
23
+ $ temp = tempnam ('/tmp/cache_dir ' , 'tmp ' );
24
+ unlink ($ temp );
25
+ mkdir ($ temp );
26
+
22
27
$ plan = 8 ;
23
28
$ t = new lime_test ($ plan );
24
29
25
- if (!ini_get ('apc.enable_cli ' ))
26
- {
27
- $ t ->skip ('APC must be enable on CLI to run these tests ' , $ plan );
28
- return ;
29
- }
30
-
31
30
// initialize the storage
32
31
try
33
32
{
40
39
}
41
40
42
41
43
- $ storage = new sfCacheSessionStorage (array ('cache ' => array ('class ' => 'sfAPCCache ' , 'param ' => array ())));
42
+ $ storage = new sfCacheSessionStorage (array ('cache ' => array ('class ' => 'sfFileCache ' , 'param ' => array (' cache_dir ' => $ temp ))));
44
43
$ t ->ok ($ storage instanceof sfStorage, '->__construct() is an instance of sfStorage ' );
45
44
46
45
$ storage ->write ('test ' , 123 );
66
65
67
66
// shutdown the storage
68
67
$ storage ->shutdown ();
68
+
69
+ // clean up cache
70
+ sfToolkit::clearDirectory ($ temp );
71
+ rmdir ($ temp );
You can’t perform that action at this time.
0 commit comments