39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
40 ilUnitUtil::performInitialisation();
49 include_once
'./Services/Cache/classes/class.ilExampleCache.php';
52 $get = $cache->getEntry(
"test_id");
53 $stat = $cache->getLastAccessStatus();
54 $value = $stat .
"-" . $get .
"-";
56 $get = $cache->storeEntry(
"test_id",
"test_value");
57 $get = $cache->getEntry(
"test_id");
58 $stat = $cache->getLastAccessStatus();
59 $value .= $stat .
"-" . $get .
"-";
63 $get = $cache->getEntry(
"test_id");
64 $stat = $cache->getLastAccessStatus();
65 $value .= $stat .
"-" . $get .
"-";
67 $this->assertEquals(
"miss--hit-test_value-miss--", $value);
testCache()
Cache tests IL_Init.
Unit tests for data cache.