From f4e2396bf321d49578aadb5c5dd92c85ccbf700a Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sat, 9 Oct 2010 19:17:20 +0000 Subject: [PATCH] Restored the ability to run extension tests from the main runner --- maintenance/tests/phpunit/suite.xml | 3 ++ .../phpunit/suites/ExtensionsTestSuite.php | 34 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) 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 -- 2.20.1