From: Chad Horohoe Date: Tue, 28 Dec 2010 18:17:16 +0000 (+0000) Subject: * verbose and color default output from phpunit X-Git-Tag: 1.31.0-rc.0~33029 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=447529064b0286c065fb41932277c7aca349eca8;p=lhc%2Fweb%2Fwiklou.git * verbose and color default output from phpunit * Make a bunch of tests subclass MediaWikiTestCase * Parser tests and ResourceLoaderTest can't subclass it yet due to various issues --- diff --git a/tests/phpunit/includes/CdbTest.php b/tests/phpunit/includes/CdbTest.php index 987a0f5be7..6c3e6664a0 100644 --- a/tests/phpunit/includes/CdbTest.php +++ b/tests/phpunit/includes/CdbTest.php @@ -4,7 +4,7 @@ * Test the CDB reader/writer */ -class CdbTest extends PHPUnit_Framework_TestCase { +class CdbTest extends MediaWikiTestCase { public function setUp() { if ( !CdbReader::haveExtension() ) { diff --git a/tests/phpunit/includes/ExternalStoreTest.php b/tests/phpunit/includes/ExternalStoreTest.php index 3c15f69755..92ec7344ac 100644 --- a/tests/phpunit/includes/ExternalStoreTest.php +++ b/tests/phpunit/includes/ExternalStoreTest.php @@ -3,7 +3,7 @@ * External Store tests */ -class ExternalStoreTest extends PHPUnit_Framework_TestCase { +class ExternalStoreTest extends MediaWikiTestCase { private $saved_wgExternalStores; function setUp() { diff --git a/tests/phpunit/includes/ExtraParserTest.php b/tests/phpunit/includes/ExtraParserTest.php index 130a1c4012..949262a519 100644 --- a/tests/phpunit/includes/ExtraParserTest.php +++ b/tests/phpunit/includes/ExtraParserTest.php @@ -3,7 +3,7 @@ /** * Parser-related tests that don't suit for parserTests.txt */ -class ExtraParserTest extends PHPUnit_Framework_TestCase { +class ExtraParserTest extends MediaWikiTestCase { function setUp() { global $wgMemc; diff --git a/tests/phpunit/includes/GlobalTest.php b/tests/phpunit/includes/GlobalTest.php index 426409e9d2..f0deabdea3 100644 --- a/tests/phpunit/includes/GlobalTest.php +++ b/tests/phpunit/includes/GlobalTest.php @@ -1,6 +1,6 @@ originals['wgReadOnlyFile'] = $wgReadOnlyFile; diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index 3dfefd4a83..719df0bf4a 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -9,7 +9,7 @@ class MockCookie extends Cookie { /** * @group Broken */ -class HttpTest extends PHPUnit_Framework_TestCase { +class HttpTest extends MediaWikiTestCase { static $content; static $headers; static $has_curl; diff --git a/tests/phpunit/includes/IPTest.php b/tests/phpunit/includes/IPTest.php index ee092997bd..3655e51547 100644 --- a/tests/phpunit/includes/IPTest.php +++ b/tests/phpunit/includes/IPTest.php @@ -3,7 +3,7 @@ * Tests for IP validity functions. Ported from /t/inc/IP.t by avar. */ -class IPTest extends PHPUnit_Framework_TestCase { +class IPTest extends MediaWikiTestCase { // not sure it should be tested with boolean false. hashar 20100924 public function testisIPAddress() { $this->assertFalse( IP::isIPAddress( false ), 'Boolean false is not an IP' ); diff --git a/tests/phpunit/includes/ImageFunctionsTest.php b/tests/phpunit/includes/ImageFunctionsTest.php index 4de4e63d4f..cb7e67f391 100644 --- a/tests/phpunit/includes/ImageFunctionsTest.php +++ b/tests/phpunit/includes/ImageFunctionsTest.php @@ -1,6 +1,6 @@ assertEquals( diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index f01c0f1cc4..e2f59abb84 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -1,6 +1,6 @@ assertNull( Xml::expandAttributes(null), @@ -175,5 +175,5 @@ class XmlTest extends PHPUnit_Framework_TestCase { } // TODO -class XmlSelectTest extends PHPUnit_Framework_TestCase { +class XmlSelectTest extends MediaWikiTestCase { } diff --git a/tests/phpunit/includes/api/ApiSetup.php b/tests/phpunit/includes/api/ApiSetup.php index f004f3c6be..80ead6bb8d 100644 --- a/tests/phpunit/includes/api/ApiSetup.php +++ b/tests/phpunit/includes/api/ApiSetup.php @@ -1,6 +1,6 @@ suite = $suite; + parent::__construct(); $this->test = $test; + $this->suite = $suite; } function count() { return 1; } diff --git a/tests/phpunit/includes/search/SearchUpdateTest.php b/tests/phpunit/includes/search/SearchUpdateTest.php index 108b280270..935425a676 100644 --- a/tests/phpunit/includes/search/SearchUpdateTest.php +++ b/tests/phpunit/includes/search/SearchUpdateTest.php @@ -18,7 +18,7 @@ class MockSearch extends SearchEngine { /** * @group Search */ -class SearchUpdateTest extends PHPUnit_Framework_TestCase { +class SearchUpdateTest extends MediaWikiTestCase { static $searchType; function update( $text, $title = 'Test', $id = 1 ) { diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml index cb25963bda..f384d84991 100644 --- a/tests/phpunit/suite.xml +++ b/tests/phpunit/suite.xml @@ -1,13 +1,14 @@ + stopOnFailure="true" + strict="true" + verbose="true"> ./includes diff --git a/tests/phpunit/suites/ExtensionsTestSuite.php b/tests/phpunit/suites/ExtensionsTestSuite.php index 4bf3542799..4f02a693ce 100644 --- a/tests/phpunit/suites/ExtensionsTestSuite.php +++ b/tests/phpunit/suites/ExtensionsTestSuite.php @@ -26,7 +26,7 @@ class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite { * Needed to avoid warnings like 'No tests found in class "ExtensionsTestSuite".' * when no extensions with tests are used. */ -class DummyExtensionsTest extends PHPUnit_Framework_TestCase { +class DummyExtensionsTest extends MediaWikiTestCase { public function testNothing() { }