Problem/Motivation

Running the module tests for last 8.x-2.x branch on a clean Drupal 8.6 massives throw:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.interval.intervals".

And most of the tests fails.

Proposed resolution

Add the dependency to interval module in the Kernel tests that are loading this service.

Comments

quiron created an issue. See original summary.

quiron’s picture

By the way. I realized that the modules lists in Kernel tests are not alphabetically sorted. Will make sense to open an issue for it o should we put it in this same patch?

quiron’s picture

Status: Needs review » Needs work

The last submitted patch, tests-broken-interval-not-enabled.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joachim’s picture

Thanks for figuring this out and posting a patch! Will review later.

> By the way. I realized that the modules lists in Kernel tests are not alphabetically sorted. Will make sense to open an issue for it o should we put it in this same patch?

I try to list the modules in a kernel test in stack order, sort of. So:

system
user
then contrib requirements
then the module we're testing
then any test modules that are needed

quiron’s picture

Tests broken because:

16:50:29 PHP Fatal error:  Trait 'Drupal\Tests\commerce_cart\Kernel\CartManagerTestTrait' not found in /var/www/html/modules/contrib/commerce_license/tests/src/Kernel/CommerceOrderSyncTest.php on line 19

(see: https://dispatcher.drupalci.org/job/drupal8_contrib_patches/48868/console)

Looks reasonable due to the commerce_cart module which implements CartManagerTestTrait is not enabled for the test. New patch fix this also.

quiron’s picture

Status: Needs work » Needs review
StatusFileSize
new4.39 KB

This should be fixing the tests. It removes an unused use statement anyway.

Status: Needs review » Needs work

The last submitted patch, 7: 3032710-tests-broken-interval-not-enabled-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jsacksick’s picture

Status: Needs work » Needs review
StatusFileSize
new11.57 KB

Tests have been failing for more than 2 years now, with the attached patch, tests seem to be passing, at least locally!

jsacksick’s picture

StatusFileSize
new13.14 KB
new3.42 KB

This fixes coding standard issues.

  • joachim committed 45a22ba on 8.x-2.x authored by jsacksick
    Issue #3032710 by quiron, jsacksick: Fixed broken tests.
    
joachim’s picture

Status: Needs review » Fixed

Wow, that's excellent!

Thanks so much for fixing this!

Status: Fixed » Closed (fixed)

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