Skip to content
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

Merged
merged 22 commits into from
Sep 7, 2016
Merged

Fix PHPUnit warnings on NODB runs #1314

merged 22 commits into from
Sep 7, 2016

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Sep 7, 2016

Lots of getMock fixes.
Cleans up the unit test output significantly and makes spotting new warnings a lot easier!

CC: @MorrisJobke @nickvergessen @LukasReschke @icewind1991

@rullzer rullzer added the 3. to review Waiting for reviews label Sep 7, 2016
@rullzer rullzer added this to the Nextcloud 11.0 milestone Sep 7, 2016
@mention-bot
Copy link

@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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙉

Copy link
Member

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"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phpunit warns about it.

@rullzer rullzer force-pushed the nodb_getmock_be_gone branch from 5e675b7 to 680b557 Compare September 7, 2016 18:42
@@ -49,7 +49,7 @@ protected function setUp(){
->disableOriginalConstructor()
->getMock();

$this->query = $this->getMock('\PDOStatement');
$this->query = $this->createMock('\PDOStatement');
Copy link
Member

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?

Copy link
Member Author

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.

@ChristophWurst
Copy link
Member

👍 looks good

@LukasReschke
Copy link
Member

LGTM

@LukasReschke LukasReschke merged commit 0a33ebd into master Sep 7, 2016
@LukasReschke LukasReschke deleted the nodb_getmock_be_gone branch September 7, 2016 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants