/**
  * Ändert die Sichtbarkeit einer CollectionRole.
  * @param $visibility boolean
  */
 private function changeRoleVisibility($visibility)
 {
     try {
         $collectionRoleModel = new Admin_Model_CollectionRole($this->getRequest()->getParam('roleid', ''));
         $collectionRoleModel->setVisibility($visibility);
         return $this->_redirectTo('index', $this->view->translate('admin_collectionroles_changevisibility', $collectionRoleModel->getObject()->getName()));
     } catch (Application_Exception $e) {
         return $this->_redirectToAndExit('index', array('failure' => $e->getMessage()));
     }
 }
 public function testSetVisibilityFalse()
 {
     $model = new Admin_Model_CollectionRole($this->collectionRoleId);
     $collectionRole = $model->getObject();
     $this->assertEquals(1, $collectionRole->getVisible());
     $model->setVisibility(false);
     $collectionRole = new Opus_CollectionRole($this->collectionRoleId);
     $this->assertEquals(0, $collectionRole->getVisible());
 }