public function CacheTest::testFetchMulti in Plug 7
File
- lib/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ CacheTest.php, line 32
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function testFetchMulti() {
$cache = $this
->_getCacheDriver();
// Test saving some values, checking if it exists, and fetching it back with multiGet
$this
->assertTrue($cache
->save('key1', 'value1'));
$this
->assertTrue($cache
->save('key2', 'value2'));
$this
->assertEquals(array(
'key1' => 'value1',
'key2' => 'value2',
), $cache
->fetchMultiple(array(
'key1',
'key2',
)));
$this
->assertEquals(array(
'key1' => 'value1',
'key2' => 'value2',
), $cache
->fetchMultiple(array(
'key1',
'key3',
'key2',
)));
$this
->assertEquals(array(
'key1' => 'value1',
'key2' => 'value2',
), $cache
->fetchMultiple(array(
'key1',
'key2',
'key3',
)));
}