public function testProcess()
 {
     $this->keyCreatorMock->expects($this->any())->method('getKey')->will($this->returnValue(array('testkey')));
     $i = 0;
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(1, $i);
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(1, $i);
     $this->cacheinclude->setForceExpire(true);
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(2, $i);
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(3, $i);
     $this->cacheinclude->setForceExpire(false);
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(4, $i);
     $i = $this->cacheinclude->process('test', function ($name) use($i) {
         $i++;
         return $i;
     }, $this->keyCreatorMock);
     $this->assertEquals(4, $i);
 }
 /**
  * @param $name
  * @param  KeyCreatorInterface $keyCreator
  * @param  array               $config
  * @return string
  */
 protected function getKey($name, KeyCreatorInterface $keyCreator, array $config = null)
 {
     return $this->prepareKey($keyCreator->getKey($name, $config ?: $this->getCombinedConfig($name)));
 }