ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCacheTest Class Reference

Unit tests for data cache. More...

+ Inheritance diagram for ilCacheTest:
+ Collaboration diagram for ilCacheTest:

Public Member Functions

 testCache ()
 Cache tests.

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Unit tests for data cache.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 33 of file ilCacheTest.php.

Member Function Documentation

ilCacheTest::setUp ( )
protected

Definition at line 37 of file ilCacheTest.php.

References ilUnitUtil\performInitialisation().

{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
}

+ Here is the call graph for this function:

ilCacheTest::testCache ( )

Cache tests.

Parameters
@return

Definition at line 48 of file ilCacheTest.php.

{
include_once './Services/Cache/classes/class.ilExampleCache.php';
$cache = new ilExampleCache();
$get = $cache->getEntry("test_id");
$stat = $cache->getLastAccessStatus();
$value.= $stat."-".$get."-";
$get = $cache->storeEntry("test_id", "test_value");
$get = $cache->getEntry("test_id");
$stat = $cache->getLastAccessStatus();
$value.= $stat."-".$get."-";
sleep(6);
$get = $cache->getEntry("test_id");
$stat = $cache->getLastAccessStatus();
$value.= $stat."-".$get."-";
$this->assertEquals("miss--hit-test_value-miss--", $value);
}

Field Documentation

ilCacheTest::$backupGlobals = FALSE
protected

Definition at line 35 of file ilCacheTest.php.


The documentation for this class was generated from the following file: