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

Update phpunit support #63

Open
larowlan opened this issue Feb 10, 2023 · 2 comments
Open

Update phpunit support #63

larowlan opened this issue Feb 10, 2023 · 2 comments

Comments

@larowlan
Copy link

larowlan commented Feb 10, 2023

Problem statement

The codebase has code that references phpunit 4 and 6 😱
It should be using PHPUnit 9 as a minimum, the current bootstrap code doesn't work with Drupal 9
This leads me to believe no-one is writing PHPUnit tests, or if they are, they're not contributing back their fixes to bootstrap.php/phpunit.xml

PHP Fatal error:  During class fetch: Uncaught Error: Class "Drupal\TestTools\PhpUnitCompatibility\RunnerVersion" not found in /app/web/core/tests/Drupal/Tests/PhpUnitCompatibilityTrait.php:10
PHP Warning:  Class "\PHPUnit\Framework\MockObject\Matcher\InvokedRecorder" not found in /app/tests/phpunit/bootstrap.php on line 198

Proposed resolution

Bring the phpunit support up to something that works with Drupal and uses a supported version of PHPUnit

@stooit
Copy link
Collaborator

stooit commented Feb 12, 2023

Thanks @larowlan -- yeah, the require-dev repo is stale. 😔

Will make sure it's given a fresh lick of paint as a part of the D10 compatibility efforts, and ensure it gets added to the maintenance schedule. Slipped off the radar somewhat since nobody is writing PHPUnit tests as you correctly assumed.

@acbramley
Copy link

Seems like this still isn't on the radar at all...

Even with up to date libraries, the PaaS docker-compose setup seemingly makes it impossible to run phpunit tests anywhere. The networking setup means from the host machine you can't talk to the database, and from the test container you can't talk to the website.

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

3 participants