* Add auto test.

This commit is contained in:
孙广明
2022-03-14 15:40:17 +08:00
parent 88c870f3e1
commit 66db8b0249
3 changed files with 28 additions and 6 deletions
+22
View File
@@ -179,4 +179,26 @@ class userTest
return $objects;
}
}
/**
* Test get user by id.
*
* @param int|string $userID
* @param string $field
* @access public
* @return void
*/
public function getByIdTest($userID, $field = 'account')
{
$objects = $this->objectModel->getById($userID, $field);
if(dao::isError())
{
$error = dao::getError();
return $error[0];
}
else
{
return $objects;
}
}
}