function testMemberGroupTimeoutDouble()
 {
     $group_id = 4;
     $member_id = 3;
     bump_member_group_timeout($member_id, $group_id, -10, false);
     $this->assertTrue(in_array($group_id, $GLOBALS['FORUM_DRIVER']->get_members_groups($member_id)));
     $member_id = 4;
     bump_member_group_timeout($member_id, $group_id, -10, false);
     $this->assertTrue(in_array($group_id, $GLOBALS['FORUM_DRIVER']->get_members_groups($member_id)));
     cleanup_member_timeouts();
     $this->assertFalse(in_array($group_id, $GLOBALS['FORUM_DRIVER']->get_members_groups(3)));
     $this->assertFalse(in_array($group_id, $GLOBALS['FORUM_DRIVER']->get_members_groups(4)));
 }
Exemplo n.º 2
0
 /**
  * Standard modular run function for CRON hooks. Searches for tasks to perform.
  */
 function run()
 {
     require_code('group_member_timeouts');
     cleanup_member_timeouts();
 }