Problem/Motivation

All the tests in the tests/src/Integration folder need to be moved to the tests/src/Unit folder to run properly with Drupal 8.3.x and beyond.

Marking as critical since this is holding up at least one other critical issue #2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition: https://github.com/fago/rules/pull/481

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new51.29 KB

Posting as a patch since I didn't have time to finish. If somebody picks this up and gets all the tests green, then I think a PR should be opened.

This moves them to a supported namespace, but there are quite a few failures (just no fatals).

jhedstrom’s picture

StatusFileSize
new1.36 KB
new51.72 KB

This gets all the integration tests passing. I think the remainder of failures are fixed by #2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition. I'll open a PR shortly.

jonathan1055’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for doing this. I had been trying to work it out, and came to the conclusion that the namespace \rules\Integration for these tests was not right, but I did not know what the correct one should be.

The patch applies OK (in my localhost) but it does not actually rename/move the files. Maybe I am not using the correct options. In addition to the file content changes, it looks like you saying that the entire file structure in /src/Integration needs to be moved to /src/Unit/Integration. I did this manually and I confirm that all the integration tests now run fine and pass:

phpunit ../modules/rules/Tests/src/unit
Time: 24.3 seconds, Memory: 257.25MB
OK (228 tests, 679 assertions)

The functional and kernel tests both have failures, but with the application of patch in #2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition we get a full clean set of passes:

phpunit ../modules/rules/Tests/src/functional
Time: 3.6 minutes, Memory: 7.25MB
OK (8 tests, 47 assertions)

and

phpunit  ../modules/rules/Tests/src/kernel
Time: 1.49 minutes, Memory: 10.00MB
OK (45 tests, 202 assertions)

I am happy to mark this RTBC. Without it, all Rules work is halted at 8.3 so I hope someone can commit it.

jonathan1055’s picture

fago’s picture

Status: Reviewed & tested by the community » Fixed

Thx, that works! Merged it.

  • jhedstrom authored 63f87ed on 8.x-3.x
    Issue #2870797 by jhedstrom, jonathan1055: Fix Integration tests on 8.3....
jonathan1055’s picture

Great. Thanks fago.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jonathan1055’s picture