Skip to content

Make testing less painful#967

Merged
lcobucci merged 11 commits into
5.0.xfrom
make-testing-less-painful
Nov 4, 2022
Merged

Make testing less painful#967
lcobucci merged 11 commits into
5.0.xfrom
make-testing-less-painful

Conversation

@lcobucci

@lcobucci lcobucci commented Nov 4, 2022

Copy link
Copy Markdown
Owner

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 Ocramius and Slamdunk 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 <[email protected]>
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 <[email protected]>
Signed-off-by: Luís Cobucci <[email protected]>
We just don't use its functionality.

Signed-off-by: Luís Cobucci <[email protected]>
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 <[email protected]>
We've missed those ones on previous versions...

Signed-off-by: Luís Cobucci <[email protected]>
Making things a bit more explicit.

Signed-off-by: Luís Cobucci <[email protected]>
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 <[email protected]>
Signed-off-by: Luís Cobucci <[email protected]>
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 <[email protected]>
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 <[email protected]>
@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