-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix PHPUnit warnings on NODB runs #1314
Conversation
@rullzer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @LukasReschke, @ChristophWurst and @DeepDiver1975 to be potential reviewers |
@@ -195,7 +195,7 @@ public function testValidateUsedCode() { | |||
->with($user) | |||
->will($this->returnValue($codes)); | |||
$this->hasher->expects($this->never()) | |||
->method('verifiy'); | |||
->method('verify'); |
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.
🙈
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.
🙉
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.
shouldn't this test have failed because of "unmockable method"?
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.
Phpunit warns about it.
5e675b7
to
680b557
Compare
@@ -49,7 +49,7 @@ protected function setUp(){ | |||
->disableOriginalConstructor() | |||
->getMock(); | |||
|
|||
$this->query = $this->getMock('\PDOStatement'); | |||
$this->query = $this->createMock('\PDOStatement'); |
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.
why didn't you use the ::class
property here?
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.
ah yeah I could now probabaly Just forgot.
👍 looks good |
LGTM |
Lots of getMock fixes.
Cleans up the unit test output significantly and makes spotting new warnings a lot easier!
CC: @MorrisJobke @nickvergessen @LukasReschke @icewind1991