Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When run Kernel tests with Drupal 8.9.x core, and without Redirect module installed, I can see following error:
1) Drupal\Tests\tome_static\Kernel\StaticRedirectTest::testRedirect
PHPUnit\Framework\Exception: Unavailable module: 'redirect'. If this module needs to be downloaded separately, annotate the test class with '@requires module redirect'.
Comment | File | Size | Author |
---|---|---|---|
#2 | kernel_test_error-3156466-2.patch | 523 bytes | sakiland |
|
Comments
Comment #2
sakiland CreditAttribution: sakiland as a volunteer commentedHere's patch
I've just added
@requires module redirect
annotation.Comment #3
samuel.mortensonRedirect is already listed as a test dependency https://git.drupalcode.org/project/tome/-/blob/8.x-1.x/tome.info.yml#L10-14, I haven't had to add @requires before. Is this only required for this specific test?
Comment #4
sakiland CreditAttribution: sakiland as a volunteer commentedI've just checked git history, this is related to issue and merged into 8.8.x release.
I will check if there is need to change any other annotation in Tome's tests.
Comment #5
sakiland CreditAttribution: sakiland as a volunteer commentedI've checked, this is the only place where we need to change annotation. I run all tests from directory tome/modules/tome_static/tests/src/Kernel
Here's output without fix
and with fix
Comment #7
samuel.mortensonThank you for checking!