From: David Causse Date: Tue, 27 Jun 2017 13:58:16 +0000 (+0200) Subject: Fix SearchEngineTest test descriptions X-Git-Tag: 1.31.0-rc.0~2866^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=158ee86e38226390ac6cd736b5d44ca369332a66;p=lhc%2Fweb%2Fwiklou.git Fix SearchEngineTest test descriptions These should describe the test not the failure. Change-Id: I82601795d925d3dd7548909f18c325eeaebd83ff --- diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php index 6e00e53166..c945d1e217 100644 --- a/tests/phpunit/includes/search/SearchEngineTest.php +++ b/tests/phpunit/includes/search/SearchEngineTest.php @@ -121,7 +121,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { $this->assertEquals( [ 'Smithee' ], $this->fetchIds( $this->search->searchText( 'smithee' ) ), - "Plain search failed" ); + "Plain search" ); } public function testPhraseSearch() { @@ -129,7 +129,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { $this->assertEquals( [ 'Smithee' ], $this->fetchIds( $res ), - "Phrase search failed" ); + "Search a phrase" ); $res = $this->search->searchText( '"smithee is one who smiths"' ); $match = $res->next(); $terms = [ 'smithee', 'is', 'one', 'who', 'smiths' ]; @@ -139,7 +139,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { } $this->assertRegexp( '/' . preg_quote( $snippet, '/' ) . '/', $match->getTextSnippet( $res->termMatches() ), - "Phrase search failed to highlight" ); + "Highlight a phrase search" ); } public function testTextPowerSearch() { @@ -150,7 +150,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { 'Talk:Not Main Page', ], $this->fetchIds( $this->search->searchText( 'smithee' ) ), - "Power search failed" ); + "Power search" ); } public function testTitleSearch() { @@ -160,7 +160,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { 'Smithee', ], $this->fetchIds( $this->search->searchTitle( 'smithee' ) ), - "Title search failed" ); + "Title search" ); } public function testTextTitlePowerSearch() { @@ -172,7 +172,7 @@ class SearchEngineTest extends MediaWikiLangTestCase { 'Talk:Smithee', ], $this->fetchIds( $this->search->searchTitle( 'smithee' ) ), - "Title power search failed" ); + "Title power search" ); } /**