lithium\tests\cases\storage\cache\adapter\XCacheTest::testWriteExpiryTtl PHP Method

testWriteExpiryTtl() public method

Note that because of the nature of XCache we cannot test if an item correctly expires. Expiration checks are done by XCache only on each _page request_.
public testWriteExpiryTtl ( )
    public function testWriteExpiryTtl()
    {
        $keys = array('key1' => 'data1');
        $expiry = 5;
        $this->XCache->write($keys, $expiry);
        $result = xcache_isset('key1');
        $this->assertTrue($result);
        xcache_unset('key1');
        $keys = array('key1' => 'data1');
        $expiry = 1;
        $this->XCache->write($keys, $expiry);
    }