/usr/share/doc/php-cache-lite/tests/pearbug7618.phpt is in php-cache-lite 1.7.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | --TEST--
pearbug7618
--FILE--
<?php
require_once('callcache.inc');
require_once('tmpdir.inc');
require_once('cache_lite_base.inc');
$options = array(
'cacheDir' => tmpDir() . '/',
'lifeTime' => 60,
'automaticSerialization' => true
);
$cache = new Cache_Lite($options);
$cacheid = "testid";
$tmpar = array();
for ($i=0; $i<2; $i++) {
$ar[] = 'foo';
if ($cache->save($ar,$cacheid)) {
echo "TRUE\n";
} else {
echo "FALSE\n";
}
if ($data = $cache->get($cacheid)) {
echo($data[0] . "\n");
} else {
echo "FALSE\n";
}
}
$cache->remove('testid');
?>
--EXPECT--
TRUE
foo
TRUE
foo
|