Acl\Test\TestCase\Adapter\CacheDbAclTest::testCaching PHP Method

testCaching() public method

Tests that permissions are cached
public testCaching ( ) : void
return void
    public function testCaching()
    {
        $this->CachedDb->Permission = $this->getMockBuilder('Acl\\Model\\Table\\PermissionsTable')->getMock();
        $this->CachedDb->Permission->expects($this->once())->method('check')->with('Samir', 'print', '*')->will($this->returnValue(true));
        $this->assertTrue($this->CachedDb->check('Samir', 'print'));
        $this->assertTrue($this->CachedDb->check('Samir', 'print'));
    }