See https://www.drupal.org/pift-ci-job/1636321
The test classes do indeed have the annotation to require the token module.
See https://git.drupalcode.org/project/file_download_link/-/blob/8.x-1.x/tes...
I don't understand why the tests are failing.
1) Drupal\Tests\file_download_link\Kernel\FileDownloadLinkTokenTest::testFormatterFileTokens
PHPUnit\Framework\Exception: Unavailable module: 'token'. If this module needs to be downloaded separately, annotate the test class with '@requires module token'./var/www/html/core/tests/Drupal/KernelTests/KernelTestBase.php:499
/var/www/html/core/tests/Drupal/KernelTests/KernelTestBase.php:346
/var/www/html/core/tests/Drupal/KernelTests/KernelTestBase.php:242
/var/www/html/modules/contrib/file_download_link/tests/src/Kernel/FileDownloadLinkTokenTest.php:41
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:691
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | file_download_link--d9_tests--3124523--6.patch | 457 bytes | danflanagan8 |
| #5 | file_download_link--d9_tests--3124523--5.patch | 1.38 KB | danflanagan8 |
| #4 | file_download_link--d9_tests--3124523--4.patch | 1.03 KB | danflanagan8 |
Comments
Comment #2
danflanagan8Comment #3
danflanagan8Comment #4
danflanagan8I found another contrib module that has a test class that requires token. Their tests do not throw the same error. Here's a link to the test class:
https://git.drupalcode.org/project/address/-/blob/8.x-1.x/tests/src/Kern...
The patch I am uploading switches the order of @group and @requires in the annotations to match the order in the test class I linked to. Maybe that'll fix the problem?
Comment #5
danflanagan8That patch didn't work...This new patch adds a composer.json so I can set token in require-dev.
Comment #6
danflanagan8Just to keep things clean, this patch reverses the swap in annotation order since it wasn't needed. This patch also adds license and homepage to composer.json.
Comment #8
danflanagan8