- Issue created by @tibezh
- πΊπ¦Ukraine tibezh
tibezh β changed the visibility of the branch 3440181-unable-to-enable to hidden.
- πΊπ¦Ukraine tibezh
tibezh β changed the visibility of the branch 3440181-unable-to-enable to active.
- last update
7 months ago run-tests.sh fatal error - last update
7 months ago run-tests.sh fatal error - Issue was unassigned.
- πΊπ¦Ukraine tibezh
Looks like smth wrong with the test execution on D7.
- π¦πΉAustria klausi π¦πΉ Vienna
Tests are failing with "PHP Fatal error: Call to undefined function rules_event_invocation_enabled() in /var/www/html/sites/all/modules/rules/tests/rules.test on line 2285"
Not sure how unit tests work in Drupal 7, maybe we need to include code or dependencies somehow?
- πΊπ¦Ukraine tibezh
Hey @klausi,
Tests are failing with "PHP Fatal error: Call to undefined function rules_event_invocation_enabled() in /var/www/html/sites/all/modules/rules/tests/rules.test on line 2285"
This error was in the 1st pipeline - https://www.drupal.org/pift-ci-job/2881566 β ,
After, I've added a setUp method and loaded rules module - https://git.drupalcode.org/project/rules/-/merge_requests/24/diffs?commi...
And we have just an error without any info - https://www.drupal.org/pift-ci-job/2881570 β - πΊπΈUnited States tr Cascadia
GitLab CI integration for this module was turned on only for D9/D10 because when GitLab CI went live it didn't work with Drupal 7. Drupal CI is still running and the D7 tests currently all pass for this module (see https://www.drupal.org/pift-ci-job/2880469 β ), but the test output is not saved anymore.
I haven't paid close attention for the past few months, but if there is now a way to test D7 contributed modules in GitLab CI then please open a new issue and provide a patch with the proper .gitlab-ci.yml file to enable this.
Rules never had unit tests in D7, so there are no examples to go by, but it wouldn't surprise me if you had to explicitly load a bunch of include files that would normally get loaded automatically by Drupal core in a Web test case. Rules unit tests in D8+ require extensive setup because unit tests don't enable modules in D8+. I really forget the details of how to write unit tests in D7 because they were rarely used and that was so long ago.