-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(User): requestChangePhoneNumber & changePhoneNumber #214
Conversation
896ad4b
to
43b0837
Compare
43b0837
to
3876853
Compare
/** | ||
* Request mobile phone verify before updating it. | ||
* | ||
* @param string $phoneNumber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里还应该有个 ttl
参数,但是其他类似方法也没带这个参数,所以这里先不加,后续统一再完善(#213)
@@ -181,6 +181,24 @@ public function testSignUpOrLoginByMobilePhone() { | |||
User::signUpOrLoginByMobilePhone("18612340000", "000000"); | |||
} | |||
|
|||
public function testRequestChangePhoneNumber() { | |||
$this->setExpectedException("LeanCloud\CloudException", null, 600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为应用设置的关系,自动跑测试的时候并不会实际发短信。不过我在本地是手动跑过这两个测试,可以成功发送短信以及修改手机号(如果需要在本地跑的话,需要使用一个开启短信服务及相关配置的应用,同时修改下面的 sms code 为实际收到的验证码)。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
或许可以设计环境变量,来决定是「假测」还是「真测」。比如 TEST_PHONE=+8616533875941 ,一旦设置了这个环境变量,就跑真测。
Codecov Report
@@ Coverage Diff @@
## master #214 +/- ##
============================================
- Coverage 67.01% 66.51% -0.50%
- Complexity 804 806 +2
============================================
Files 36 36
Lines 2295 2270 -25
============================================
- Hits 1538 1510 -28
- Misses 757 760 +3
Continue to review full report at Codecov.
|
@@ -9,7 +9,7 @@ version="$1" | |||
|
|||
#### Build new changelog | |||
echo "" >> Changelog.md.0 | |||
echo "$version 发布日期:`date +%Y-%m-%d`" >> Changelog.md.0 | |||
echo "$version Released on `date +%Y-%m-%d`" >> Changelog.md.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDK 新政,release log 和 api doc 改用英文
* `make doc` to build documentation (should running on PHP < 7.2) | ||
* `make doc` to build documentation. | ||
The make task uses PHP 5.6, to install it on recent versions of macOS, | ||
see https://github.com/eXolnet/homebrew-deprecated/pull/25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在现在的 macOS 上安装 PHP 5.6 很艰难,因为 openssl 依赖的关系,大量方法都失效了。好不容易找到这个可用的 homebrew 公式。
@@ -181,6 +181,24 @@ public function testSignUpOrLoginByMobilePhone() { | |||
User::signUpOrLoginByMobilePhone("18612340000", "000000"); | |||
} | |||
|
|||
public function testRequestChangePhoneNumber() { | |||
$this->setExpectedException("LeanCloud\CloudException", null, 600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
或许可以设计环境变量,来决定是「假测」还是「真测」。比如 TEST_PHONE=+8616533875941 ,一旦设置了这个环境变量,就跑真测。
No description provided.