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

testDeleteWithScope() public method

public testDeleteWithScope ( )
    public function testDeleteWithScope()
    {
        $adapter = new XCache(array('scope' => 'primary'));
        xcache_set('primary:key1', 'test1', 60);
        xcache_set('key1', 'test2', 60);
        $keys = array('key1');
        $expected = array('key1' => 'test1');
        $result = $adapter->delete($keys);
        $this->assertEqual($expected, $result);
        $result = xcache_isset('key1');
        $this->assertTrue($result);
        $result = xcache_isset('primary:key1');
        $this->assertFalse($result);
    }