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.
Here is a summary of the discussion from
#2470661: Port "Flag a [entity type]" Rules action to 8.x
For plugins being added to the flag module - We need tests that extend \Drupal\Tests\rules\Integration\RulesEntityIntegrationTestBase
Those tests are best housed in the rules module.
Remaining Tasks:-
- Finish the flag issue. at which point the new Plugins will exist
- Move the tests in the rules module
- .Harmonize them using \Drupal\Tests\rules\Integration\Action\BanIPTest
as a template.
Comments
Comment #2
dasjoHi,
I'm wondering, what's the reason why these tests should live in the rules module?
From my point of view tests should remain next to the functionality, in this case they should live in the flag module.
Comment #3
djevans CreditAttribution: djevans as a volunteer commentedThere's an example of a Rules integration test in Flag here:
https://www.drupal.org/node/2540032#comment-11056785
Comment #4
TR CreditAttribution: TR commentedThe Rules module is the wrong place for Flag tests. #2540032: Port "Flag is flagged" Rules event to 8.x now contains Flag tests that depend on RulesEntityIntegrationTestBase and which work just fine on the testbot.