test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / suites / ExtensionsTestSuite.php
blobeec773dbb3c93c5cd8c8c7806a6e0a5c0d3dfb6e
1 <?php
2 /**
3 * This test suite runs unit tests registered by extensions.
4 * See http://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList for details of how to register your tests.
5 */
7 class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite {
8 public function __construct() {
9 parent::__construct();
10 $files = array();
11 wfRunHooks( 'UnitTestsList', array( &$files ) );
12 foreach ( $files as $file ) {
13 $this->addTestFile( $file );
15 if ( !count( $files ) ) {
16 $this->addTest( new DummyExtensionsTest( 'testNothing' ) );
20 public static function suite() {
21 return new self;
25 /**
26 * Needed to avoid warnings like 'No tests found in class "ExtensionsTestSuite".'
27 * when no extensions with tests are used.
29 class DummyExtensionsTest extends MediaWikiTestCase {
30 public function testNothing() {
31 $this->assertTrue( true );