Пример #1
0
    public function testReplaceItemsReturnsFailedKeys()
    {
        $this->assertTrue($this->_storage->setItem('key1', 'value1'));

        $failedKeys = $this->_storage->replaceItems(array(
            'key1' => 'XYZ',
            'key2' => 'value2',
        ));

        $this->assertSame(array('key2'), $failedKeys);
        $this->assertSame('XYZ', $this->_storage->getItem('key1'));
        $this->assertFalse($this->_storage->hasItem('key2'));
    }