public function testCacheIsSetToCacheDefinedInParametersArray() { /** @var \Doctrine\Common\Cache\Cache $dummyCache */ $cache = $this->getMockForAbstractClass('\\Doctrine\\Common\\Cache\\CacheProvider'); $session = new Session(array(SessionParameter::REPOSITORY_ID => 'foo', SessionParameter::CACHE_CLASS => get_class($cache)), null, null, null, null, $this->getBindingsHelperMock()); $this->assertEquals($cache, $session->getCache()); }