r74832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74831‎ | r74832 | r74833 >
Date:13:24, 16 October 2010
Author:hashar
Status:ok
Tags:
Comment:
* Fix r74790 by actually calling setup (using parent::setup)
* Replace inexistant markTestIgnored() method with markTestSkipped()
* Add comments
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit/includes/search/SearchDbTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchDbTest.php
@@ -6,11 +6,15 @@
77 var $db;
88
99 function setUp() {
 10+ // Get a database connection or skip test
1011 $this->db = wfGetDB( DB_MASTER );
1112 if ( !$this->db ) {
1213 $this->markTestIncomplete( "Can't find a database to test with." );
1314 }
1415
 16+ parent::setup();
 17+
 18+ // Initialize search database with data
1519 $GLOBALS['wgContLang'] = new Language;
1620 $this->insertSearchData();
1721
Index: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php
@@ -3,6 +3,7 @@
44 require_once dirname(dirname(dirname(__FILE__))). '/bootstrap.php';
55
66 /**
 7+ * This class is not directly tested. Instead it is extended by SearchDbTest.
78 * @group Stub
89 */
910 class SearchEngineTest extends MediaWikiTestSetup {
@@ -13,16 +14,15 @@
1415 * Will skip current test if DB does not support search.
1516 */
1617 function setup() {
17 - // Get database type and version
 18+ // Search tests require MySQL or SQLite with FTS
 19+ # Get database type and version
1820 $dbType = $this->db->getType();
19 -
20 - // will skip unless mysql or sqlite with FTS
2121 $dbSupported =
2222 ($dbType === 'mysql')
2323 || ( $dbType === 'sqlite' && $this->db->getFulltextSearchModule() == 'FTS3' );
2424
2525 if( !$dbSupported ) {
26 - $this->markTestIgnored( "MySQL or SQLite with FTS3 only" );
 26+ $this->markTestSkipped( "MySQL or SQLite with FTS3 only" );
2727 }
2828 }
2929

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74790Fixes for r74787:...maxsem18:27, 14 October 2010

Status & tagging log