lithium\tests\cases\storage\cache\adapter\FileTest::testDecrementWithScope PHP Method

testDecrementWithScope() public method

    public function testDecrementWithScope()
    {
        $adapter = new File(array('scope' => 'primary'));
        $this->File->write(array('primary_key1' => 5));
        $this->File->write(array('key1' => 10));
        $expected = 4;
        $result = $adapter->decrement('key1');
        $this->assertEqual($expected, $result);
        $expected = array('key1' => 4);
        $result = $adapter->read(array('key1'));
        $this->assertEqual($expected, $result);
    }