r74836 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74835‎ | r74836 | r74837 >
Date:15:07, 16 October 2010
Author:maxsem
Status:ok
Tags:
Comment:
Renamed all setup() in tests to setUp(). Although PHP doesn't care, PHPUnit docs prefer the latter. Removed a pointless override in one case.
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit/includes/CdbTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/HttpTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/UploadTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/db/DatabaseSqliteTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php
@@ -9,7 +9,7 @@
1010
1111 public function setUp() {
1212 global $wgEnableUploads, $wgAllowCopyUploads, $wgAllowAsyncCopyUploads;
13 - parent::setup();
 13+ parent::setUp();
1414
1515 $wgEnableUploads = true;
1616 $wgAllowCopyUploads = true;
Index: trunk/phase3/maintenance/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -23,7 +23,7 @@
2424 class DatabaseSqliteTest extends PHPUnit_Framework_TestCase {
2525 var $db;
2626
27 - public function setup() {
 27+ public function setUp() {
2828 if ( !Sqlite::isPresent() ) {
2929 $this->markTestSkipped( 'No SQLite support detected' );
3030 }
@@ -84,4 +84,4 @@
8585 $this->fail( $result );
8686 }
8787 }
88 -}
 88+}
\ No newline at end of file
Index: trunk/phase3/maintenance/tests/phpunit/includes/HttpTest.php
@@ -27,7 +27,7 @@
2828
2929 var $test_posturl = array( "http://www.comp.leeds.ac.uk/cgi-bin/Perl/environment-example" => "review=test" );
3030
31 - function setup() {
 31+ function setUp() {
3232 putenv( "http_proxy" ); /* Remove any proxy env var, so curl doesn't get confused */
3333 if ( is_array( self::$content ) ) {
3434 return;
Index: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php
@@ -13,7 +13,7 @@
1414 * Checks for database type & version.
1515 * Will skip current test if DB does not support search.
1616 */
17 - function setup() {
 17+ function setUp() {
1818 // Search tests require MySQL or SQLite with FTS
1919 # Get database type and version
2020 $dbType = $this->db->getType();
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiTest.php
@@ -19,10 +19,6 @@
2020
2121 class ApiTest extends ApiTestSetup {
2222
23 - function setup() {
24 - parent::setup();
25 - }
26 -
2723 function testRequireOnlyOneParameterDefault() {
2824 $mock = new MockApi();
2925
Index: trunk/phase3/maintenance/tests/phpunit/includes/UploadTest.php
@@ -8,7 +8,7 @@
99
1010 function setUp() {
1111 global $wgContLang;
12 - parent::setup();
 12+ parent::setUp();
1313 $wgContLang = Language::factory( 'en' );
1414 $this->upload = new UploadTestHandler;
1515 }
Index: trunk/phase3/maintenance/tests/phpunit/includes/CdbTest.php
@@ -6,7 +6,7 @@
77
88 class CdbTest extends PHPUnit_Framework_TestCase {
99
10 - public function setup() {
 10+ public function setUp() {
1111 if ( !CdbReader::haveExtension() ) {
1212 $this->markTestIncomplete( 'This test requires native CDB support to be present.' );
1313 }

Status & tagging log