/** * Add user to group * * @expectedException ForbiddenAccessException */ public function testAddUserToGroupNotOwned() { $group = GroupsFactory::createGroup(); $user = UserFactory::createUser(); $userCalling = UserFactory::createUser(); $response = GroupController::apiAddUser(new Request(array('auth_token' => self::login($userCalling), 'usernameOrEmail' => $user->username, 'group_alias' => $group['group']->alias))); }
/** * Add user to group helper * * @param array $groupData * @param Users $user */ public static function addUserToGroup(array $groupData, Users $user) { GroupController::apiAddUser(new Request(array("auth_token" => OmegaupTestCase::login($groupData["owner"]), "usernameOrEmail" => $user->username, "group_alias" => $groupData["group"]->alias))); }
/** * Add user to group helper * * @param array $groupData * @param Users $user */ public static function addUserToGroup(array $groupData, Users $user) { GroupController::apiAddUser(new Request(array('auth_token' => OmegaupTestCase::login($groupData['owner']), 'usernameOrEmail' => $user->username, 'group_alias' => $groupData['group']->alias))); }