From: Max Semenik Date: Sat, 9 Oct 2010 19:17:20 +0000 (+0000) Subject: Restored the ability to run extension tests from the main runner X-Git-Tag: 1.31.0-rc.0~34562 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=f4e2396bf321d49578aadb5c5dd92c85ccbf700a;p=lhc%2Fweb%2Fwiklou.git Restored the ability to run extension tests from the main runner --- diff --git a/maintenance/tests/phpunit/suite.xml b/maintenance/tests/phpunit/suite.xml index d430705a00..6ad6ec7985 100644 --- a/maintenance/tests/phpunit/suite.xml +++ b/maintenance/tests/phpunit/suite.xml @@ -20,6 +20,9 @@ ./suites/UploadFromUrlTestSuite.php + + ./suites/ExtensionsTestSuite.php + diff --git a/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php b/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php index bdaea10f59..b97708abae 100644 --- a/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php +++ b/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php @@ -1,4 +1,34 @@ addTestFile( $file ); + } + if ( !count( $files ) ) { + $this->addTest( new DummyExtensionsTest( 'testNothing' ) ); + } + } + + public static function suite() { + return new self; + } +} + +/** + * Needed to avoid warnings like 'No tests found in class "ExtensionsTestSuite".' + * when no extensions with tests are used. + */ +class DummyExtensionsTest extends PHPUnit_Framework_TestCase { + public function testNothing() { + + } +} \ No newline at end of file