getSub() public method

public getSub ( )
Ejemplo n.º 1
0
 public function testCacheKey()
 {
     $ck = new CacheKey('base', 'id', 'sub');
     $this->assertEquals('base', $ck->getBase());
     $this->assertEquals('id', $ck->getId());
     $this->assertEquals('sub', $ck->getSub());
     $ck = new CacheKey(null, null);
     $ck->setBase('base')->setId('id')->setSub('sub');
     $this->assertEquals('base', $ck->getBase());
     $this->assertEquals('id', $ck->getId());
     $this->assertEquals('sub', $ck->getSub());
     $this->assertNotNull($ck->getHash());
 }
Ejemplo n.º 2
0
 /**
  * @codeCoverageIgnore
  */
 protected function hashKey(CacheKey $k)
 {
     return $k->getBase() . $k->getId() . serialize($k->getSub());
 }