예제 #1
0
 /**
  * Tests the generate method with no cache returned.
  */
 public function testGenerateNoCache()
 {
     // Set expectations for the mocked cache backend.
     $expected_cid = 'user_permissions_hash:administrator,authenticated';
     $this->cache->expects($this->once())->method('get')->with($expected_cid)->will($this->returnValue(FALSE));
     $this->cache->expects($this->once())->method('set')->with($expected_cid, $this->isType('string'));
     $this->permissionsHash->generate($this->account1);
 }
 /**
  * {@inheritdoc}
  */
 public function getContext()
 {
     return $this->permissionsHashGenerator->generate($this->user);
 }