Tests don't run without installing contrib modules

Created on 28 June 2024, 2 months ago
Updated 18 July 2024, about 2 months ago

While trying to run drupal core tests, I ran this:

$ vendor/bin/phpunit -c core/
PHP Fatal error:  Uncaught Error: Class "Drupal\Tests\aggregator\Functional\Rest\ItemResourceTestBase" not found in /var/www/html/html/modules/contrib/hal/tests/src/Functional/aggregator/ItemHalJsonTestBase.php:13

It turns out that this error is because the aggregator module has recently been taken out of core, and now needs to be installed as a contrib module. So I did so.

$ vendor/bin/phpunit -c core/
PHP Fatal error:  Uncaught Error: Class "Drupal\Tests\rdf\Functional\Rest\RdfMappingResourceTestBase" not found in /home/dan/MFIN-Data-Catalogue/html/modules/contrib/hal/tests/src/Functional/rdf/RdfMappingHalJsonCookieTest.php:11

The RDF module has also been deprecated, and also moved to contrib.

Installing both of Aggregator and RDF allowed the tests to run properly. I suggest that they be added as dependencies for hal, or else that the tests be updated.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇨🇦Canada dan3h

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dan3h
  • Status changed to Closed: outdated about 2 months ago
  • 🇳🇱Netherlands bbrala Netherlands

    They have been added to the dev dependencies to make gitlab work. So closing this one.

Production build 0.71.5 2024