Index: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchDbTest.php |
— | — | @@ -6,11 +6,15 @@ |
7 | 7 | var $db; |
8 | 8 | |
9 | 9 | function setUp() { |
| 10 | + // Get a database connection or skip test |
10 | 11 | $this->db = wfGetDB( DB_MASTER ); |
11 | 12 | if ( !$this->db ) { |
12 | 13 | $this->markTestIncomplete( "Can't find a database to test with." ); |
13 | 14 | } |
14 | 15 | |
| 16 | + parent::setup(); |
| 17 | + |
| 18 | + // Initialize search database with data |
15 | 19 | $GLOBALS['wgContLang'] = new Language; |
16 | 20 | $this->insertSearchData(); |
17 | 21 | |
Index: trunk/phase3/maintenance/tests/phpunit/includes/search/SearchEngineTest.php |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | require_once dirname(dirname(dirname(__FILE__))). '/bootstrap.php'; |
5 | 5 | |
6 | 6 | /** |
| 7 | + * This class is not directly tested. Instead it is extended by SearchDbTest. |
7 | 8 | * @group Stub |
8 | 9 | */ |
9 | 10 | class SearchEngineTest extends MediaWikiTestSetup { |
— | — | @@ -13,16 +14,15 @@ |
14 | 15 | * Will skip current test if DB does not support search. |
15 | 16 | */ |
16 | 17 | function setup() { |
17 | | - // Get database type and version |
| 18 | + // Search tests require MySQL or SQLite with FTS |
| 19 | + # Get database type and version |
18 | 20 | $dbType = $this->db->getType(); |
19 | | - |
20 | | - // will skip unless mysql or sqlite with FTS |
21 | 21 | $dbSupported = |
22 | 22 | ($dbType === 'mysql') |
23 | 23 | || ( $dbType === 'sqlite' && $this->db->getFulltextSearchModule() == 'FTS3' ); |
24 | 24 | |
25 | 25 | if( !$dbSupported ) { |
26 | | - $this->markTestIgnored( "MySQL or SQLite with FTS3 only" ); |
| 26 | + $this->markTestSkipped( "MySQL or SQLite with FTS3 only" ); |
27 | 27 | } |
28 | 28 | } |
29 | 29 | |