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 broken TokenGeneratorTest::testIdTokenGenerationWithoutDpopKey UnitTest #41

Open
Potherca opened this issue Nov 24, 2023 · 0 comments

Comments

@Potherca
Copy link
Member

Looks like a Class mock needs to be replaced with an Interface mock.

Class "Lcobucci\JWT\Signer\Key\InMemory" is declared "final" and cannot be doubled

PHPUnit 9.6.13 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.30 with PCOV 1.0.11
Configuration: /home/runner/work/php-solid-auth/php-solid-auth/phpunit.xml.dist

............................E...............SSS..S.               51 / 51 (100%)

Time: 00:00.327, Memory: 22.00 MB

There was 1 error:

1) Pdsinterop\Solid\Auth\TokenGeneratorTest::testIdTokenGenerationWithoutDpopKey
PHPUnit\Framework\MockObject\ClassIsFinalException: Class "Lcobucci\JWT\Signer\Key\InMemory" is declared "final" and cannot be doubled

/home/runner/work/php-solid-auth/php-solid-auth/src/TokenGenerator.php:211
/home/runner/work/php-solid-auth/php-solid-auth/src/TokenGenerator.php:94
/home/runner/work/php-solid-auth/php-solid-auth/tests/unit/TokenGeneratorTest.php:313
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

No branches or pull requests

1 participant