How to SimpleTest a module's use of drupal_alter() or module_invoke_all()?
You can create a test module and place hidden = TRUE in the .info file.

This will hide the module in the user interface but you can still enable it in your setUp() method.

See http://drupalcode.org/project/drupal.git/blob/refs/heads/7.x:/modules/file/tests/file_module_test.info for an example.