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 2020
2121sfConfig::set ('sf_symfony_lib_dir ' , realpath ($ _test_dir .'/../lib ' ));
2222
23+ // setup cache
24+ $ temp = tempnam ('/tmp/cache_dir ' , 'tmp ' );
25+ unlink ($ temp );
26+ mkdir ($ temp );
27+
2328$ plan = 8 ;
2429$ t = new lime_test ($ plan );
2530
26- if (!ini_get ('apc.enable_cli ' )) {
27- $ t ->skip ('APC must be enable on CLI to run these tests ' , $ plan );
28-
29- return ;
30- }
31-
3231// initialize the storage
3332try {
3433 $ storage = new sfCacheSessionStorage ();
3736 $ t ->pass ('->__construct() throws an exception when not provided a cache option ' );
3837}
3938
40- $ storage = new sfCacheSessionStorage (array ('cache ' => array ('class ' => 'sfAPCCache ' , 'param ' => array ())));
39+ $ storage = new sfCacheSessionStorage (array ('cache ' => array ('class ' => 'sfFileCache ' , 'param ' => array (' cache_dir ' => $ temp ))));
4140$ t ->ok ($ storage instanceof sfStorage, '->__construct() is an instance of sfStorage ' );
4241
4342$ storage ->write ('test ' , 123 );
6362
6463// shutdown the storage
6564$ storage ->shutdown ();
65+
66+ // clean up cache
67+ sfToolkit::clearDirectory ($ temp );
68+ rmdir ($ temp );
You can’t perform that action at this time.
0 commit comments