* Fix r74790 by actually calling setup (using parent::setup)
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Oct 2010 13:24:35 +0000 (13:24 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Oct 2010 13:24:35 +0000 (13:24 +0000)
* Replace inexistant markTestIgnored() method with markTestSkipped()
* Add comments

maintenance/tests/phpunit/includes/search/SearchDbTest.php
maintenance/tests/phpunit/includes/search/SearchEngineTest.php

index d103ad4..eecedfd 100644 (file)
@@ -6,11 +6,15 @@ class SearchDbTest extends SearchEngineTest {
        var $db;
 
        function setUp() {
+               // Get a database connection or skip test
                $this->db = wfGetDB( DB_MASTER );
                if ( !$this->db  ) {
                        $this->markTestIncomplete( "Can't find a database to test with." );
                }
 
+               parent::setup();
+
+               // Initialize search database with data
                $GLOBALS['wgContLang'] = new Language;
                $this->insertSearchData();
 
index 5fd84c6..024b440 100644 (file)
@@ -3,6 +3,7 @@
 require_once dirname(dirname(dirname(__FILE__))). '/bootstrap.php';
 
 /**
+ * This class is not directly tested. Instead it is extended by SearchDbTest.
  * @group Stub
  */
 class SearchEngineTest extends MediaWikiTestSetup {
@@ -13,16 +14,15 @@ class SearchEngineTest extends MediaWikiTestSetup {
         * Will skip current test if DB does not support search.
         */
        function setup() {
-               // Get database type and version
+               // Search tests require MySQL or SQLite with FTS
+               # Get database type and version
                $dbType    = $this->db->getType();
-
-               // will skip unless mysql or sqlite with FTS
                $dbSupported =
                        ($dbType === 'mysql')
                        || (   $dbType === 'sqlite' && $this->db->getFulltextSearchModule() == 'FTS3' );
 
                if( !$dbSupported ) {
-                       $this->markTestIgnored( "MySQL or SQLite with FTS3 only" );
+                       $this->markTestSkipped( "MySQL or SQLite with FTS3 only" );
                }
        }