When running the tests locally, some tests fail because the test depends on some module that is not present in the file system. By adding the dependencies in the getInfo() method of the test classes, these tests are skipped when the needed dependencies are not present.

I'll try to create a patch for this in the next week or so.

Comments

Stevel created an issue. See original summary.

damienmckenna’s picture

Oh, I didn't know that was possible! Awesome!

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new2.42 KB

So something like this?

damienmckenna’s picture

I don't see any difference when this patch is applied and one of the modules is not available? E.g. if I remove the 'context' module's codebase and run the tests it still gives the following:

Fail      Other      metatag.helper.te   35 MetatagTestHelper->setUp()         
    Enabled modules: context, metatag_context, metatag_context_tests, node,
    taxonomy, ctools, token, metatag, metatag_test
Stevel’s picture

StatusFileSize
new12.63 KB

The test should disappear from the list when a dependency is not available. I believe you need to clear the cache / rebuild the registry.

I've added a longer patch list.

Edit: the ctools and token dependency come from MetatagTestHelper. Other dependencies are modules required by the specific test.

  • DamienMcKenna committed 49d80d5 on 7.x-1.x authored by Stevel
    Issue #2811735 by Stevel, DamienMcKenna: Added dependencies to all tests...
damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #2758749: Plan for Metatag 7.x-1.18 release

Ah! Now I understand. Thanks! Committed.

Status: Fixed » Closed (fixed)

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