Undefined type 'Drupal\Tests\rules\Kernel\RulesKernelTestBase'

Created on 6 July 2023, 12 months ago
Updated 7 July 2023, 12 months ago

Problem/Motivation

I noticed some kernel tests were not running, and the stack trace led me to the Honeypot module.

Steps to reproduce

Install a fresh Drupal 9 or 10 instance.

Install the Honeypot module 2.1.2

(set up PHPUnit)

Run test:

$ phpunit web/modules/contrib/honeypot/tests/src/Kernel/EventIntegrationTest.php 
PHP Fatal error:  Uncaught Error: Class "Drupal\Tests\rules\Kernel\RulesKernelTestBase" not found in /var/www/html/web/modules/contrib/honeypot/tests/src/Kernel/EventIntegrationTest.php:12

Observe class Drupal\Tests\rules\Kernel\RulesKernelTestBase does not exist in Drupal basic installation.

Proposed resolution

Not a clue. Good chance I am just doing something wrong on my end.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alexb7217

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

Comments & Activities

  • Issue created by @alexb7217
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    I don't know how you're running your tests, but Honeypot tests run properly and without error on Drupal CI. See https://www.drupal.org/node/1232556/qa β†’

    Honeypot contains integration with the Rules module, and Honeypot declares Rules as a test dependency in honeypot.info.yml and in composer.json. This allows Honeypot to test the Rules integration. Rules is not required to use Honeypot in any circumstance other than tests.

    This seems to be a problem with your test setup, not with Honeypot.

  • πŸ‡ΊπŸ‡ΈUnited States alexb7217

    I would agree. After filing this, came across several other similar contib module tests not working properly. Thank you. I will investigate our setup.

    Feel free to close this or allow to autoclose. I don't seem to have the power to do so.

  • Status changed to Closed: works as designed 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States alexb7217

    Or maybe I can close it?

Production build 0.69.0 2024