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

Make testing less painful #967

Merged
merged 11 commits into from
Nov 4, 2022
Merged

Make testing less painful #967

merged 11 commits into from
Nov 4, 2022

Conversation

lcobucci
Copy link
Owner

@lcobucci lcobucci commented Nov 4, 2022

This is a big refactor of the test suite, doing some small bc-breaks to simplify the codebase.

BC-breaks:

[BC] CHANGED: Lcobucci\JWT\Signer\Hmac#algorithm() was marked "@internal"
[BC] CHANGED: Lcobucci\JWT\Signer\Hmac#minimumBitsLengthForKey() was marked "@internal"
[BC] REMOVED: Method Lcobucci\JWT\Signer\Ecdsa::create() was removed

@lcobucci lcobucci added this to the 5.0.0 milestone Nov 4, 2022
@lcobucci lcobucci requested review from Slamdunk and Ocramius November 4, 2022 20:17
@lcobucci lcobucci self-assigned this Nov 4, 2022
Having two tests suites for such a small library doesn't make much sense
to me anymore. It's much simpler to execute and maintain a single one.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
We're only using HTTP URIs on tests this is no security issue but an
inspection from PHPStorm is adding some annoying warnings for these.

This replaces everything to make that inspection happier =P

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
We just don't use its functionality.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
We only have one test case that mocks the file system and several that
are actually reading files.

This removes mocking for the sake of simplicity.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
We've missed those ones on previous versions...

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Making things a bit more explicit.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
We were making things much more complicated than needed, also causing
potential issues if/when behaviour is overridden.

This removes PHPUnit Mock from the setup, simplifying everything.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Being very specific regarding what's covered helps on a few things but
we took things a bit too far in this project, to the point that it isn't
that productive.

This is an attempt to simplify things a bit.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
It seems like better reflection doesn't support this syntax, which
always cause the BC-break check to report issues.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@lcobucci lcobucci force-pushed the make-testing-less-painful branch from fb05975 to 989c3f7 Compare November 4, 2022 21:38
@lcobucci lcobucci merged commit d7239af into 5.0.x Nov 4, 2022
@lcobucci lcobucci deleted the make-testing-less-painful branch November 4, 2022 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant