public function setKey(CacheKey $ck) { $this->key = $ck; return $this; }
public function testKey() { $ck = new CacheKey('base', 'id', 'sub'); $cd = new CacheData($ck, ''); $this->assertEquals($cd->key, $ck); $ck2 = new CacheKey('base', 'id', 'sub2'); $cd->setKey($ck2); $this->assertEquals($cd->key, $ck2); }