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

Various fixes to PdoTest #43

Merged
merged 2 commits into from
Jan 24, 2013
Merged

Various fixes to PdoTest #43

merged 2 commits into from
Jan 24, 2013

Conversation

stefanaxelsson
Copy link
Contributor

See issue #40

  • Removed calls to arrayHasKey in unit tests.
  • Added test of refresh token.
  • Check authorization_code instead of access_token in testSetAuthorizationCode
  • Check client_id instead of client_identifier in testGetClientDetails
  • Added interface type hinting where applicable. testCheckUserCredentials uses public setUser/getUser which are not part of any interface and can therefore not be type hinted.

* Removed calls to arrayHasKey in unit tests.
* Added test of refresh token.
$this->assertTrue($success);

$token = $storage->getAccessToken('newtoken');
$this->assertNotNull($token);
$this->arrayHasKey('access_token', $token);
$this->arrayHasKey('client_id', $token);
$this->arrayHasKey('user_id', $token);
Copy link
Owner

Choose a reason for hiding this comment

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

We should change these to assertArrayHasKey like above, instead of removing them all together. Otherwise, the tests below will throw PHP warnings if the call to getAccessToken returns false/null

@bshaffer
Copy link
Owner

These changes look great! if you can add back assertArrayHasKey where you removed arrayHasKey, I will merge.

Thank you!

@stefanaxelsson
Copy link
Contributor Author

Feel free to close issue #40 when these changes are merged.

bshaffer added a commit that referenced this pull request Jan 24, 2013
@bshaffer bshaffer merged commit 1d494b4 into bshaffer:develop Jan 24, 2013
@bshaffer
Copy link
Owner

Phenomenal! Thank you for these fixed.

@stefanaxelsson stefanaxelsson deleted the issue40 branch January 25, 2013 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants