public function testUpdateUserProfile_SetLangCode_LangCodeSet() { self::$environ->clean(); // setup parameters $userId = self::$environ->createUser('username', 'name', '*****@*****.**'); $params = array('id' => '', 'interfaceLanguageCode' => 'th'); $newUserId = UserCommands::updateUserProfile($params, $userId); // user profile updated $user = new UserProfileModel($newUserId); $this->assertEquals('th', $user->interfaceLanguageCode); $this->assertEquals($newUserId, $userId); }
/** * Create/Update a User Profile * * @param array $params (encoded UserProfileModel) * @return string Id of written object */ public function user_updateProfile($params) { return UserCommands::updateUserProfile($params, $this->userId); }