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

[SDK-2752] Expand test coverage and finish migration to Pest framework #552

Merged
merged 34 commits into from
Sep 1, 2021

Conversation

evansims
Copy link
Member

@evansims evansims commented Aug 24, 2021

Changes

Although this PR is large and intimidating to look it, it doesn't change anything regarding the logic of the SDK. Its purpose is to expand the unit tests to 100% coverage of the v8 SDK, and to update our unit test syntax to the modern Pest format we had already adopted with our newer test additions in v8.

The highlighted intent of this pull request:

Other tweaks in this PR of note:

  • Renamed the newly contributed InMemoryStorage class to MemoryStore to match the naming convention of other storage classes. As it is new to v8, this is not a breaking change.
  • References to the internal httpClient var in the ManagementEndpoint class now use the public getHttpClient() method to ensure the HTTP client is properly instantiated before its use.
  • Renamed the methods on Auth0\SDK\API\Management\Tenants to match the naming conventions of other Management classes, which follow the naming conventions of the endpoints themselves.
  • Fixed a bug with handleInvitation() on the Auth0\SDK\Auth0 in which the login URL was not properly returned.
  • Added an argument to clear() on Auth0\SDK\Auth0 to opt out of clearing transient storage, in the event we're only needing to wipe out a stale user session to make way for a new one during code exchange.
  • Added an argument to getRequestParameter() on Auth0\SDK\Auth0 to support applying different internal PHP sanitization filters.
  • Removed some unnecessary code from SdkConfiguration which is now handled by improved type checking in ConfigurableMixin.
  • Added support for mocked HTTP responses to TokenVerifier for unit testing purposes.
  • Added code coverage metablocks in fringe portions of the SDK that cannot be tested (for example in the event a PHP runtime was built to not return it's version, or isn't compiled with OpenSSL, etc.)
  • Made some bug fixes to the Toolkit in regard to object referencing.

Testing

Tests can be run locally using composer run tests, or in a Docker container using composer run tests:docker.

Contributor Checklist

@evansims evansims closed this Aug 24, 2021
@evansims evansims reopened this Aug 24, 2021
@evansims evansims marked this pull request as ready for review August 31, 2021 23:54
@evansims evansims requested a review from a team as a code owner August 31, 2021 23:54
@evansims evansims changed the title Expand test coverage and switch to Pest format [SDK-2752] Expand test coverage and finish migration to Pest framework Sep 1, 2021
@evansims evansims requested a review from jimmyjames September 1, 2021 18:15
@evansims evansims merged commit 0764d2e into main Sep 1, 2021
@evansims evansims deleted the expand-test-coverage branch September 2, 2021 03:10
@evansims evansims mentioned this pull request Sep 3, 2021
2 tasks
@evansims evansims added this to the 8.0.0 milestone Sep 3, 2021
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants