public function testInternalHasItemsCallsInternalHasItem() { $this->_storage = $this->getMockForAbstractAdapter(array('internalHasItem')); $items = array('key1' => true); $this->_storage->expects($this->atLeastOnce())->method('internalHasItem')->with($this->equalTo('key1'))->will($this->returnValue(true)); $rs = $this->_storage->hasItems(array_keys($items)); $this->assertEquals(array('key1'), $rs); }
/** * Test multiple items. * * @param array $keys * @return array Array of found keys * @throws Exception\ExceptionInterface * * @triggers hasItems.pre(PreEvent) * @triggers hasItems.post(PostEvent) * @triggers hasItems.exception(ExceptionEvent) */ public function hasItems(array $keys) { $options = $this->getOptions(); if ($options->getReadable() && $options->getClearStatCache()) { clearstatcache(); } return parent::hasItems($keys); }