You are here

public function CacheTest::testFetchMultiWillFilterNonRequestedKeys in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php \Doctrine\Tests\Common\Cache\CacheTest::testFetchMultiWillFilterNonRequestedKeys()

File

vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php, line 56

Class

CacheTest

Namespace

Doctrine\Tests\Common\Cache

Code

public function testFetchMultiWillFilterNonRequestedKeys() {

  /* @var $cache \Doctrine\Common\Cache\CacheProvider|\PHPUnit_Framework_MockObject_MockObject */
  $cache = $this
    ->getMockForAbstractClass('Doctrine\\Common\\Cache\\CacheProvider', array(), '', true, true, true, array(
    'doFetchMultiple',
  ));
  $cache
    ->expects($this
    ->once())
    ->method('doFetchMultiple')
    ->will($this
    ->returnValue(array(
    '[foo][]' => 'bar',
    '[bar][]' => 'baz',
    '[baz][]' => 'tab',
  )));
  $this
    ->assertEquals(array(
    'foo' => 'bar',
    'bar' => 'baz',
  ), $cache
    ->fetchMultiple(array(
    'foo',
    'bar',
  )));
}