Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 May 2011 at 23:19 UTC
Updated:
29 Jul 2014 at 19:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhedstromComment #2
jhedstromAdding the 'Usability' tag, as that is what this issue comes down to. Without this assertion, when a dependent module isn't available, the test results are confusing and mis-leading (for example, the first fail will be something such as 'permission foo' not found).
Comment #3
catchWe should add something to the simpletest tests to confirm this actually works. Also this is a task rather than a bug, but looks like a good addition.
Comment #4
jhedstromWriting tests (eg, calling parent::setIp with bogus modules and expecting a test failure), will most likely require some version of #301005: Add "expected fail" functionality to simpletest.
Comment #5
catchI meant writing a test for simpletest itself - it should be possible to assert the assertion.
Comment #6
catchAlthough I haven't looked at the simpletests for simpletest for ages so that might not be possible. Another option would just be to upload a patch that passes without this patch applied, and fails with it, then we could postpone reall tests on expectedFail().
Comment #7
jhedstromHadn't realized simpletest did assertAssertion. Here's a patch with an added test in simpletest.test. The fake module is called 'non_existent_module', which the test tries to enable during setUp.
Comment #8
catchNice.
Comment #9
jhedstromAdding the 'needs backport to D7' tag because this causes very frustrating issues when trying to run simpletests from contrib that require a variety of other modules to run.
Comment #10
webchickNeat! I had somehow forgotten about assertAssertion(). :)
Committed to 8.x and 7.x. Thanks!