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

testSimpleRead() public method

public testSimpleRead ( )
    public function testSimpleRead()
    {
        $key = 'read_key';
        $data = 'read data';
        $keys = array($key);
        $result = apc_store($key, $data, 60);
        $this->assertTrue($result);
        $expected = array($key => $data);
        $result = $this->Apc->read($keys);
        $this->assertEqual($expected, $result);
        $result = apc_delete($key);
        $this->assertTrue($result);
        $key = 'another_read_key';
        $data = 'read data';
        $keys = array($key);
        $result = apc_store($key, $data, 60);
        $this->assertTrue($result);
        $expected = array($key => $data);
        $result = $this->Apc->read($keys);
        $this->assertEqual($expected, $result);
        $result = apc_delete($key);
        $this->assertTrue($result);
    }