summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/search/SearchUpdateTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/search/SearchUpdateTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/search/SearchUpdateTest.php')
-rw-r--r--tests/phpunit/includes/search/SearchUpdateTest.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/phpunit/includes/search/SearchUpdateTest.php b/tests/phpunit/includes/search/SearchUpdateTest.php
index 7d867bc4..2f4fd501 100644
--- a/tests/phpunit/includes/search/SearchUpdateTest.php
+++ b/tests/phpunit/includes/search/SearchUpdateTest.php
@@ -17,6 +17,7 @@ class MockSearch extends SearchEngine {
/**
* @group Search
+ * @group Database
*/
class SearchUpdateTest extends MediaWikiTestCase {
@@ -25,19 +26,11 @@ class SearchUpdateTest extends MediaWikiTestCase {
$this->setMwGlobals( 'wgSearchType', 'MockSearch' );
}
- function update( $text, $title = 'Test', $id = 1 ) {
- $u = new SearchUpdate( $id, $title, $text );
- $u->doUpdate();
- return array( MockSearch::$title, MockSearch::$text );
- }
-
function updateText( $text ) {
- list( , $resultText ) = $this->update( $text );
- $resultText = trim( $resultText ); // abstract from some implementation details
- return $resultText;
+ return trim( SearchUpdate::updateText( $text ) );
}
- function testUpdateText() {
+ public function testUpdateText() {
$this->assertEquals(
'test',
$this->updateText( '<div>TeSt</div>' ),
@@ -69,7 +62,7 @@ EOT
);
}
- function testBug32712() {
+ public function testBug32712() {
$text = "text „http://example.com“ text";
$result = $this->updateText( $text );
$processed = preg_replace( '/Q/u', 'Q', $result );