PopTest\Cache\ApcTest::testSaveAndLoad PHP Method

testSaveAndLoad() public method

public testSaveAndLoad ( )
    public function testSaveAndLoad()
    {
        if (function_exists('apc_add')) {
            $str = 'This is my test variable. It contains a string.';
            $c = Cache::factory(new Apc(), 30);
            $c->save('str', $str);
            $this->assertEquals($str, $c->load('str'));
            $c->remove('str');
            $c->clear();
        }
    }