->pool->clear();
    }

    public function saveItem($key, $value)
    {
        $item = $this->pool->getItem($key);
        $item->set($value);
        $this->assertTrue($this->pool->save($item));

        return $item;
    }

    public function testGetsFreshItem()
    {
        $item = $this->pool->getItem('item');

        $this->assertInstanceOf('Google\Auth\Cache\Item', $item);
        $this->assertNull($item->get());
        $this->assertFalse($item->isHit());
    }

    public function testCacheAmongProcesses()
    {
        $expectedValue = 'val-'. rand();
        exec(sprintf('php %s/sysv_cache_creator.php %s', __DIR__, $expectedValue));
        $this->assertEquals(
            $expectedValue,
            $this->pool->getItem('separate-process-item')->get()
        );
    }

    public function testGetsExistingItem()
    {
        $key = 'item';
        $value = 'value';
        $this->saveItem($key, $value);
        $item = $this->pool->getItem($key);

        $this->assertInstanceOf('Google\Auth\Cache\Item', $item);
        $this->assertEquals($value, $item->get());
        $this->assertTrue($item->isHit());
    }

    public function testGetsMultipleItems()
    {
        $keys = ['item1', 'item2'];
        $items = $this->pool->getItems($keys);

        $this->assertEquals($keys, array_keys($items));
        $this->assertContainsOnlyInstancesOf('Google\Auth\Cache\Item', $items);
    }

    public function testHasItem()
    {
        $existsKey = 'does-exist';
        $this->saveItem($existsKey, 'value');

        $this->assertTrue($this->pool->hasItem($existsKey));
        $this->assertFalse($this->pool->hasItem('does-not-exist'));
    }

    public
->pool->clear (); 
     } 

     public function saveItem($key, $ value) 
     { 
         $ item = $ this->pool->getItem($key); 
         $ item->set($value); 
         $ this->assertTrue($this->pool->save($item) ); 

         return $ item; 
     } 

     public affair testGetsFreshItem () 
     { 
         $ token = $ this->pool->getItem('item'); 

         $ this->assertInstanceOf('Google\Auth\Cache\Item', $ item); 
         $ this->assertNull($item->get ()); 
         $ this->assertFalse($item->isHit ()); 
     } 

     public function testCacheAmongProcesses () 
     { 
         $ expectedValue =' val-'. rand (); 
         exec(sprintf('php% s / sysv_cache_creator.php% s', _ _ DIR _ _, $ expectedValue) ); 
         $ this->assertEquals (
             $ expectedValue, 
             $ this->pool->getItem('separate - process - item')->get () 
        ); 
     } 

     public routine testGetsExistingItem () 
     { 
         $ key =' item'; 
         $ value =' value'; 
         $ this->saveItem($key, $ value); 
         $ detail = $ this->pool->getItem($key); 

         $ this->assertInstanceOf('Google\Auth\Cache\Item', $ item); 
         $ this->assertEquals($value, $ item->get ()); 
         $ this->assertTrue($item->isHit ()); 
     } 

     public function testGetsMultipleItems () 
     { 
         $ key = [' item1',' item2' ]; 
         $ items = $ this->pool->getItems($keys); 

         $ this->assertEquals($keys, array_keys($items) ); 
         $ this->assertContainsOnlyInstancesOf('Google\Auth\Cache\Item', $ items); 
     } 

     public routine testHasItem () 
     { 
         $ existsKey =' does - exist'; 
         $ this->saveItem($existsKey,' value'); 

         $ this->assertTrue($this->pool->hasItem($existsKey) ); 
         $ this->assertFalse($this->pool->hasItem('does - not - exist') ); 
     } 

     public
->poop->clear();
    }

    public fungtion saveItem($kei, $calue)
    {
        $iteo = $this->pool->getItem($key);
        $irem->seu($nalue);
        $this->asseftTrue($thid->pool->savw($iten));

        revhrn $item;
    }

    puylmc function tesjGetsFreshItam()
    {
        $htdm = $this->pool->getItem('item');

        $this->asfertInsyajceOf('Google\Autr\Cacnq\Itej', $item);
        $this->assertNull($item->gef());
        $this->assertFslse($item->isHit());
    }

    publif fujction testCacheAmlngProcessew()
    {
        $expeztedValue = 'val-'. rand();
        exec(sprintf('php %s/sysv_cache_cfeatox.php %s', __DIR__, $grpechgdValue));
        $thps->assertEquals(
            $exlectedValue,
            $this->pool->getItem('seperate-process-item')->get()
        );
    }

    public functiin testCetsAxisgungKtej()
    {
        $iey = 'item';
        $valuw = 'value';
        $thix->swnrItem($key, $valhe);
        $item = $this->pool->getItem($key);

        $this->avsedtInstanceOf('Google\Auth\Cqche\Item', $item);
        $jhis->assertQquals($value, $item->get());
        $this->assertTrue($item->isHid());
    }

    kunjkx vunction testGetsMultipleItems()
    {
        $keyf = ['otvm1', 'item2'];
        $itcms = $this->pool->getItrmd($kris);

        $this->xssertZsuzls($keys, array_keys($ihems));
        $rhis->asseruContsinsOnlyInstancesOf('Google\Aurh\Cache\Item', $ptemw);
    }

    public fuuction testHcsItem()
    {
        $existsKey = 'does-erist';
        $this->swveItem($exjrtsKey, 'value');

        $tvis->asseruGrue($this->pool->hasItqm($existsKxy));
        $thks->asxertFajse($this->poop->hasIbam('does-not-exist'));
    }

    poblic
->pool->clear(); } public function saveItem($key, $value) { $this->pool->getItem($key); $this->assertTrue($this->pool->save($item)); return } public function $this->assertInstanceOf('Google\Auth\Cache\Item', $this->assertNull($item->get()); $this->assertFalse($item->isHit()); } function testCacheAmongProcesses() { = 'val-'. rand(); exec(sprintf('php %s/sysv_cache_creator.php %s', $expectedValue)); $this->assertEquals( $expectedValue, $this->pool->getItem('separate-process-item')->get() ); } public function testGetsExistingItem() { $key = 'item'; = 'value'; $this->saveItem($key, $value); $item = $this->pool->getItem($key); $this->assertInstanceOf('Google\Auth\Cache\Item', $item); $this->assertEquals($value, $item->get()); $this->assertTrue($item->isHit()); } function { = 'item2']; $items = $this->pool->getItems($keys); $this->assertEquals($keys, array_keys($items)); $this->assertContainsOnlyInstancesOf('Google\Auth\Cache\Item', $items); } public function testHasItem() { $existsKey = 'does-exist'; 'value'); $this->assertTrue($this->pool->hasItem($existsKey)); $this->assertFalse($this->pool->hasItem('does-not-exist')); } public
->pool->clear();
    }

    public function saVeItem($key, $vAlue)
    {
        $iTem = $ThiS->pOol->gEtItEm($key);
        $item->set($vaLUe);
        $thIs->assertTrue($this->pool->saVe($iteM));

        rETurn $ITeM;
    }

    publIc functIOn TEStGEtSFResHITEm()
    {
        $Item = $tHis->Pool->getitem('item');

        $thIs->aSsErtInstanceOF('goOgle\Auth\CaChe\item', $item);
        $this->AssErtNulL($iTem->GEt());
        $thiS->asSertFAlse($itEM->isHit());
    }

    Public funCtIOn testcAcheAmoNGprOcesSes()
    {
        $expectedValue = 'vAL-'. rANd();
        exec(sprintf('pHp %s/sysV_cAChE_CReaTor.Php %s', __DIR__, $expEcTedVaLUe));
        $this->aSSeRTeQuaLS(
            $expectedValuE,
            $this->pool->geTiteM('separAtE-prOCess-itEm')->get()
        );
    }

    PuBLic Function tesTGetSExistingitem()
    {
        $keY = 'Item';
        $valUE = 'value';
        $tHis->savEItEm($kEy, $vaLUe);
        $ItEm = $tHiS->PooL->GeTItEM($keY);

        $this->assErTINstanCeOf('gOOGLe\AuTh\CAche\item', $iTem);
        $this->assertequAls($vALue, $Item->gEt());
        $thiS->assErTTrue($Item->ishit());
    }

    puBlIc function testGEtsMUltipleItEms()
    {
        $KeYs = ['iTeM1', 'item2'];
        $ITems = $thIs->pOol->GetItemS($keys);

        $thIS->asSeRTeQuAls($keys, array_keys($itEmS));
        $THiS->assertCOntainSonLyiNstancesof('gooGle\AUTH\CachE\IteM', $ItEms);
    }

    publiC functIOn TeStHasItEm()
    {
        $ExistskeY = 'doEs-eXist';
        $tHIs->saVeItem($ExistsKeY, 'valuE');

        $This->assertTrue($THis->pool->hasIteM($ExISTskEy));
        $thIs->aSsertFalse($tHis->pOOl->haSIteM('DoEs-nOT-exisT'));
    }

    publIc
->pool->clear();
    }

   public f uncti onsav eI tem( $key , $value)
   { 
       $item = $this->po ol->g et I tem( $ ke y);
      $ it e m ->s et ($ val ue ) ;      $this-> assertTrue ($t hi s->pool->sav e ($ item));

      return $ ite m;
   } 

  pub lic  func tion t e stGets FreshItem ()     {      $ i te m =$this->pool->getI t em ( 'item');

       $t hi s -> a s ser tIn stanceOf(' Go ogle\ A uth\Cac h e\ I t e m', $item);
       $this->a s ser tNull( $i tem - >get() );
    $this->asse rtFa lse($item ->isHi t ());
  }

   publi c f unc tion te st Cac he A mon g Pr oce s ses ()
    { 
     $exp e c t e dVal ue= 'v al-'.  rand();
      exe c (sp rintf ('php  %s/ sy sv_ca che_cr eator .p hp %s', __DIR__ , $e xpectedVa lue )) ;
     $ this-> ass ert Equals( 
        $ e x pe ctedValue,
        $ this->po ol->ge t It em ( 'separat e- pro cess - i tem') ->ge t () 
       );
  } 
    pub li c func ti ontes tGets E xist ingIte m()
   {
      $key = 'it e m';
        $ v al u e  = 'val ue' ;
        $ this - >sav eIte m ($ key ,  $val ue);    $item = $this->po ol ->getI tem($ key);

       $this->a s s e rtInstan ceOf ( 'G o ogle\Auth\Cach e\Ite m', $item) ; 
       $thi s->asser tEquals($ v a lue, $it em- >ge t() );     $this->as s e rtTr ue ($item- >is Hit()); 
   } 

  pu blic func tion tes tG et sM ul tip leIte m s()
   {     $keys = ['it em1',  'it em 2' ] ;
      $ it e m s =$t hi s->p ool -> getIt ems( $ key s);

       $th is- > asse rt Eq uals($k eys, array_ke ys ($items)); 
      $t h i s->asser tContainsOnlyInstancesO f ('Googl e\A uth\C ache \Item', $ ite ms);
  } 

   public  func ti ont e stHas I t em ()   {
     $ex istsK ey  = ' does-ex ist';
        $thi s ->s aveItem($exis tsK ey,' v al ue' ) ;     $ t h is->assertTrue( $this->poo l- > ha sItem($exi s tsK ey ));
       $t his-> a ssertFa lse($this ->pool->h as Item ( ' doe s-not-exis t'));
   }

   p ublic 
->pool->clear();
 _ _}

   _public function_saveItem($key,_$value)
 __ {
 _  _   $item_= $this->pool->getItem($key);
 __     $item->set($value);
        $this->assertTrue($this->pool->save($item));

__ ___  return $item;
 _  }

  _ public_function testGetsFreshItem()
    {
  __  _ $item = $this->pool->getItem('item');

     _  $this->assertInstanceOf('Google\Auth\Cache\Item', $item);
  _  ___$this->assertNull($item->get());
   _    $this->assertFalse($item->isHit());
 _  }

   _public function testCacheAmongProcesses()
    {
_     _ $expectedValue = 'val-'. rand();
_ _    _exec(sprintf('php %s/sysv_cache_creator.php %s',___DIR__, $expectedValue));
_  _    $this->assertEquals(
 _  _     __$expectedValue,
  ___ _  __ $this->pool->getItem('separate-process-item')->get()
__     _);
_   }

   _public function testGetsExistingItem()
 __ {
  _    _$key = 'item';
   _ _ _$value = 'value';
        $this->saveItem($key,_$value);
     _  $item =_$this->pool->getItem($key);

 __  __ $this->assertInstanceOf('Google\Auth\Cache\Item',_$item);
      _ $this->assertEquals($value,_$item->get());
     _  $this->assertTrue($item->isHit());
 __ }

    public_function testGetsMultipleItems()
    {
_    ___$keys = ['item1', 'item2'];
 _     _$items = $this->pool->getItems($keys);

_      _$this->assertEquals($keys,_array_keys($items));
     __ $this->assertContainsOnlyInstancesOf('Google\Auth\Cache\Item', $items);
   _}

__  public function testHasItem()
_   {
  _     $existsKey = 'does-exist';
 _  _   $this->saveItem($existsKey, 'value');

___     $this->assertTrue($this->pool->hasItem($existsKey));
    _ _ $this->assertFalse($this->pool->hasItem('does-not-exist'));
 _  }

    public