+ userTest: add method to test the checkBeforeBatchUpdate method.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user