We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04be314 commit a4eefbcCopy full SHA for a4eefbc
src/Testing/UserAuthMockery.php
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+/**
5
+ * This file is part of KnowYourself.
6
+ *
7
+ * @link https://www.zhiwotansuo.cn
8
+ * @document https://github.com/kydever/work-wx-user/blob/main/README.md
9
+ * @contact l@hyperf.io
10
+ * @license https://github.com/kydever/work-wx-user/blob/main/LICENSE
11
+ */
12
+namespace KY\WorkWxUser\Testing;
13
14
+use KY\WorkWxUser\UserAuth;
15
16
+class UserAuthMockery
17
+{
18
+ public static function mockToken(int $id): string
19
+ {
20
+ $userAuth = new UserAuth($id, $id . '_unit');
21
+ $userAuth->save();
22
23
+ return $userAuth->getToken();
24
+ }
25
+}
0 commit comments