public function testDoesAllow()
 {
     $this->calendar->setCruds(Permissions::CREATE);
     $this->assertTrue($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::READ));
     $this->assertFalse($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::READ);
     $this->assertFalse($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::READ));
     $this->assertFalse($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::UPDATE);
     $this->assertFalse($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::READ));
     $this->assertTrue($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::DELETE);
     $this->assertFalse($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::READ));
     $this->assertFalse($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::SHARE);
     $this->assertFalse($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::READ));
     $this->assertFalse($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertFalse($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::ALL);
     $this->assertTrue($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::READ));
     $this->assertTrue($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::ALL_CALENDAR);
     $this->assertTrue($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::READ));
     $this->assertTrue($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::SHARE));
     $this->calendar->setCruds(Permissions::ALL_OBJECT);
     $this->assertFalse($this->calendar->doesAllow(Permissions::CREATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::READ));
     $this->assertTrue($this->calendar->doesAllow(Permissions::UPDATE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::DELETE));
     $this->assertTrue($this->calendar->doesAllow(Permissions::SHARE));
 }