+ userTest: add method to test the checkBeforeBatchUpdate method.

This commit is contained in:
liugang
2023-12-15 09:09:59 +08:00
parent 8cba83986e
commit 26ca49ab3b
+22
View File
@@ -437,6 +437,28 @@ class userTest
return array('result' => (int)$result, 'errors' => $errors);
}
/**
* 测试批量编辑用户前检查提交的数据。
* Test check posted data before batch editing users.
*
* @param array $users
* @param string $verifyPassword
* @access public
* @return array
*/
public function checkBeforeBatchUpdateTest(array $users, string $verifyPassword): array
{
$result = $this->objectModel->checkBeforeBatchUpdate($users, $verifyPassword);
$errors = dao::getError();
foreach($errors as $key => $error)
{
if(is_array($error)) $errors[$key] = implode('', $error);
}
return array('result' => (int)$result, 'errors' => $errors);
}
/**
* 测试检查提交的用户密码。
* Test check posted user password.