File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 20
20
21
21
sfConfig::set ('sf_symfony_lib_dir ' , realpath ($ _test_dir .'/../lib ' ));
22
22
23
+ // setup cache
24
+ $ temp = tempnam ('/tmp/cache_dir ' , 'tmp ' );
25
+ unlink ($ temp );
26
+ mkdir ($ temp );
27
+
23
28
$ plan = 8 ;
24
29
$ t = new lime_test ($ plan );
25
30
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
-
32
31
// initialize the storage
33
32
try {
34
33
$ storage = new sfCacheSessionStorage ();
37
36
$ t ->pass ('->__construct() throws an exception when not provided a cache option ' );
38
37
}
39
38
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 ))));
41
40
$ t ->ok ($ storage instanceof sfStorage, '->__construct() is an instance of sfStorage ' );
42
41
43
42
$ storage ->write ('test ' , 123 );
63
62
64
63
// shutdown the storage
65
64
$ 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