lithium\tests\cases\storage\cache\adapter\ApcTest::testWriteNoExpiry PHP Method

testWriteNoExpiry() public method

public testWriteNoExpiry ( )
    public function testWriteNoExpiry()
    {
        $keys = array('key1' => 'data1');
        $apc = new Apc(array('expiry' => null));
        $expiry = null;
        $result = $apc->write($keys, $expiry);
        $this->assertTrue($result);
        $result = apc_exists('key1');
        $this->assertTrue($result);
        apc_delete('key1');
        $apc = new Apc(array('expiry' => Cache::PERSIST));
        $expiry = Cache::PERSIST;
        $result = $apc->write($keys, $expiry);
        $this->assertTrue($result);
        $result = apc_exists('key1');
        $this->assertTrue($result);
        apc_delete('key1');
        $apc = new Apc();
        $expiry = Cache::PERSIST;
        $result = $apc->write($keys, $expiry);
        $this->assertTrue($result);
        $result = apc_exists('key1');
        $this->assertTrue($result);
    }