Exemplo n.º 1
0
 /**
  * covering code
  * @return void
  */
 public function testCovering()
 {
     $rez = DM\UsersGroups::getAvailableGroups();
     $this->assertTrue(!empty($rez), 'Empty groups');
     $rez = DM\UsersGroups::getAvailableUsers();
     $this->assertTrue(!empty($rez), 'Empty users');
     $rez = DM\UsersGroups::getMemberGroupIds(1);
     $this->assertTrue(empty($rez), 'Empty member groups');
     $rez = DM\UsersGroups::getGroupUserIds(2);
     $this->assertTrue(empty($rez), '!Empty group users for everyone');
     $rez = DM\UsersGroups::getDisplayData();
     $this->assertTrue(!empty($rez), 'Display data');
 }
Exemplo n.º 2
0
 /**
  * Retreive defined groups
  * Used in CB.DB for groupsStore
  * @returns array of groups records
  */
 public static function getUserGroups()
 {
     $rez = array('success' => true, 'data' => DM\UsersGroups::getAvailableGroups());
     return $rez;
 }