jenkins-bot has submitted this change and it was merged.
Change subject: Add @group tags to phpunit tests
......................................................................
Add @group tags to phpunit tests
* also fix spelling and remove unused imports
Change-Id: I11cb005a43405aeb4b885128c6d167d4c4c21954
---
M tests/unit/ClusterSettingsTest.php
M tests/unit/CompletionSuggesterTest.php
M tests/unit/ConnectionTest.php
M tests/unit/ElasticaErrorHandlerTest.php
M tests/unit/HooksTest.php
M tests/unit/IndexFieldsTest.php
M tests/unit/InterwikiSearcherTest.php
M tests/unit/Job/MassIndexTest.php
M tests/unit/LanguageDetectTest.php
M tests/unit/Query/BoostTemplatesFeatureTest.php
M tests/unit/Query/FileFeatureTest.php
M tests/unit/Query/FullTextQueryStringQueryBuilder.php
M tests/unit/Query/GeoFeatureTest.php
M tests/unit/Query/HasTemplateFeatureTest.php
M tests/unit/Query/InCategoryFeatureTest.php
M tests/unit/Query/InTitleFeatureTest.php
M tests/unit/Query/MoreLikeFeatureTest.php
M tests/unit/Query/PreferRecentFeatureTest.php
M tests/unit/Query/SimpleKeywordFeatureTest.php
M tests/unit/RequestLoggerTest.php
M tests/unit/RescoreBuilderTest.php
M tests/unit/Search/EscaperTest.php
M tests/unit/Search/FiltersTest.php
M tests/unit/Search/ResultTest.php
M tests/unit/Search/ResultsTypeTest.php
M tests/unit/Search/SearchFieldsTest.php
M tests/unit/SearchConfigTest.php
M tests/unit/SearcherTest.php
M tests/unit/SuggestBuilderTest.php
M tests/unit/SuggestScoringTest.php
M tests/unit/UserTestingTest.php
M tests/unit/UtilTest.php
32 files changed, 86 insertions(+), 6 deletions(-)
Approvals:
Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
DCausse: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/unit/ClusterSettingsTest.php
b/tests/unit/ClusterSettingsTest.php
index 0e297d6..0a28c49 100644
--- a/tests/unit/ClusterSettingsTest.php
+++ b/tests/unit/ClusterSettingsTest.php
@@ -2,6 +2,9 @@
namespace CirrusSearch;
+/**
+ * @group CirrusSearch
+ */
class ClusterSettingsTest extends \PHPUnit_Framework_TestCase {
public static function provideShardCount() {
diff --git a/tests/unit/CompletionSuggesterTest.php
b/tests/unit/CompletionSuggesterTest.php
index 7373204..8d416f2 100644
--- a/tests/unit/CompletionSuggesterTest.php
+++ b/tests/unit/CompletionSuggesterTest.php
@@ -23,6 +23,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class CompletionSuggesterTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/unit/ConnectionTest.php b/tests/unit/ConnectionTest.php
index f72cc5e..9740b45 100644
--- a/tests/unit/ConnectionTest.php
+++ b/tests/unit/ConnectionTest.php
@@ -22,6 +22,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class ConnectionTest extends PHPUnit_Framework_TestCase {
/**
diff --git a/tests/unit/ElasticaErrorHandlerTest.php
b/tests/unit/ElasticaErrorHandlerTest.php
index 070ad2e..d0d27d6 100644
--- a/tests/unit/ElasticaErrorHandlerTest.php
+++ b/tests/unit/ElasticaErrorHandlerTest.php
@@ -2,6 +2,9 @@
namespace CirrusSearch;
+/**
+ * @group CirrusSearch
+ */
class ElasticaErrorHandlerTest extends \PHPUnit_Framework_TestCase {
public static function provideExceptions() {
diff --git a/tests/unit/HooksTest.php b/tests/unit/HooksTest.php
index 2302392..f007bc2 100644
--- a/tests/unit/HooksTest.php
+++ b/tests/unit/HooksTest.php
@@ -21,6 +21,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class HooksTest extends PHPUnit_Framework_TestCase {
public function testHooksAreArrays() {
diff --git a/tests/unit/IndexFieldsTest.php b/tests/unit/IndexFieldsTest.php
index c7de4a8..34cff26 100644
--- a/tests/unit/IndexFieldsTest.php
+++ b/tests/unit/IndexFieldsTest.php
@@ -2,6 +2,9 @@
use MediaWiki\MediaWikiServices;
+/**
+ * @group CirrusSearch
+ */
class IndexFieldsTest extends MediaWikiTestCase {
public function getTypes() {
@@ -49,4 +52,4 @@
$this->assertEquals( $type, $field->getIndexType() );
$this->assertEquals( "test$typeName", $field->getName() );
}
-}
\ No newline at end of file
+}
diff --git a/tests/unit/InterwikiSearcherTest.php
b/tests/unit/InterwikiSearcherTest.php
index b6a7085..b7dd05d 100644
--- a/tests/unit/InterwikiSearcherTest.php
+++ b/tests/unit/InterwikiSearcherTest.php
@@ -3,11 +3,12 @@
namespace CirrusSearch;
use CirrusSearch;
-use CirrusSearch\Test\HashSearchConfig;
-use FauxRequest;
use RequestContext;
use Title;
+/**
+ * @group CirrusSearch
+ */
class InterwikiSearcherTest extends \MediaWikiTestCase {
public function loadTestProvider() {
return [
diff --git a/tests/unit/Job/MassIndexTest.php b/tests/unit/Job/MassIndexTest.php
index c6a1a16..cc6bbf7 100644
--- a/tests/unit/Job/MassIndexTest.php
+++ b/tests/unit/Job/MassIndexTest.php
@@ -22,6 +22,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class MassIndexTest extends PHPUnit_Framework_TestCase {
/**
diff --git a/tests/unit/LanguageDetectTest.php
b/tests/unit/LanguageDetectTest.php
index 3439bc0..cd65bc3 100644
--- a/tests/unit/LanguageDetectTest.php
+++ b/tests/unit/LanguageDetectTest.php
@@ -22,6 +22,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class LanguageDetectTest extends \MediaWikiTestCase {
diff --git a/tests/unit/Query/BoostTemplatesFeatureTest.php
b/tests/unit/Query/BoostTemplatesFeatureTest.php
index 448c90b..302f020 100644
--- a/tests/unit/Query/BoostTemplatesFeatureTest.php
+++ b/tests/unit/Query/BoostTemplatesFeatureTest.php
@@ -5,6 +5,9 @@
use CirrusSearch\SearchConfig;
use CirrusSearch\Search\SearchContext;
+/**
+ * @group CirrusSearch
+ */
class BoostTemplatesFeatureTest extends \PHPUnit_Framework_TestCase {
public function parseProvider() {
diff --git a/tests/unit/Query/FileFeatureTest.php
b/tests/unit/Query/FileFeatureTest.php
index e8c3607..de9fc1e 100644
--- a/tests/unit/Query/FileFeatureTest.php
+++ b/tests/unit/Query/FileFeatureTest.php
@@ -1,6 +1,10 @@
<?php
+
namespace CirrusSearch\Query;
+/**
+ * @group CirrusSearch
+ */
class FileFeatureTest extends BaseSimpleKeywordFeatureTest {
public function parseProviderNumeric() {
@@ -120,4 +124,4 @@
$feature = new FileTypeFeature();
$feature->apply( $context, $term );
}
-}
\ No newline at end of file
+}
diff --git a/tests/unit/Query/FullTextQueryStringQueryBuilder.php
b/tests/unit/Query/FullTextQueryStringQueryBuilder.php
index b282423..edc120a 100644
--- a/tests/unit/Query/FullTextQueryStringQueryBuilder.php
+++ b/tests/unit/Query/FullTextQueryStringQueryBuilder.php
@@ -7,6 +7,9 @@
use CirrusSearch\Search\SearchContext;
use CirrusSearch\Util;
+/**
+ * @group CirrusSearch
+ */
class FullTextQueryStringQueryBuilderTest extends \PHPUnit_Framework_TestCase {
public function syntaxUsedProvider() {
diff --git a/tests/unit/Query/GeoFeatureTest.php
b/tests/unit/Query/GeoFeatureTest.php
index e7edeb1..736ae54 100644
--- a/tests/unit/Query/GeoFeatureTest.php
+++ b/tests/unit/Query/GeoFeatureTest.php
@@ -27,6 +27,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class GeoFeatureTest extends MediaWikiTestCase {
diff --git a/tests/unit/Query/HasTemplateFeatureTest.php
b/tests/unit/Query/HasTemplateFeatureTest.php
index 27f33cb..87fdd78 100644
--- a/tests/unit/Query/HasTemplateFeatureTest.php
+++ b/tests/unit/Query/HasTemplateFeatureTest.php
@@ -2,6 +2,9 @@
namespace CirrusSearch\Query;
+/**
+ * @group CirrusSearch
+ */
class HasTemplateFeatureText extends BaseSimpleKeywordFeatureTest {
public function parseProvider() {
diff --git a/tests/unit/Query/InCategoryFeatureTest.php
b/tests/unit/Query/InCategoryFeatureTest.php
index dec250f..774257d 100644
--- a/tests/unit/Query/InCategoryFeatureTest.php
+++ b/tests/unit/Query/InCategoryFeatureTest.php
@@ -5,6 +5,9 @@
use LoadBalancer;
use IDatabase;
+/**
+ * @group CirrusSearch
+ */
class InCategoryFeatureText extends BaseSimpleKeywordFeatureTest {
public function parseProvider() {
diff --git a/tests/unit/Query/InTitleFeatureTest.php
b/tests/unit/Query/InTitleFeatureTest.php
index 88156bb..0ee4aca 100644
--- a/tests/unit/Query/InTitleFeatureTest.php
+++ b/tests/unit/Query/InTitleFeatureTest.php
@@ -5,6 +5,9 @@
use CirrusSearch\Search\Escaper;
use CirrusSearch\Search\SearchContext;
+/**
+ * @group CirrusSearch
+ */
class InTitleFeatureTest extends BaseSimpleKeywordFeatureTest {
public function parseProvider() {
diff --git a/tests/unit/Query/MoreLikeFeatureTest.php
b/tests/unit/Query/MoreLikeFeatureTest.php
index 0b12fb4..1e0c37e 100644
--- a/tests/unit/Query/MoreLikeFeatureTest.php
+++ b/tests/unit/Query/MoreLikeFeatureTest.php
@@ -24,6 +24,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class MoreLikeFeatureTest extends MediaWikiTestCase {
diff --git a/tests/unit/Query/PreferRecentFeatureTest.php
b/tests/unit/Query/PreferRecentFeatureTest.php
index 6c5c734..166838e 100644
--- a/tests/unit/Query/PreferRecentFeatureTest.php
+++ b/tests/unit/Query/PreferRecentFeatureTest.php
@@ -4,6 +4,9 @@
use CirrusSearch\Search\SearchContext;
+/**
+ * @group CirrusSearch
+ */
class PreferRecentFeatureText extends \MediaWikiTestCase {
public function parseProvider() {
diff --git a/tests/unit/Query/SimpleKeywordFeatureTest.php
b/tests/unit/Query/SimpleKeywordFeatureTest.php
index fcd26d9..084752d 100644
--- a/tests/unit/Query/SimpleKeywordFeatureTest.php
+++ b/tests/unit/Query/SimpleKeywordFeatureTest.php
@@ -4,6 +4,9 @@
use CirrusSearch\Search\SearchContext;
+/**
+ * @group CirrusSearch
+ */
class SimpleKeywordFeatureTest extends \PHPUnit_Framework_TestCase {
public function applyProvider() {
return [
diff --git a/tests/unit/RequestLoggerTest.php b/tests/unit/RequestLoggerTest.php
index c80d294..9d65d96 100644
--- a/tests/unit/RequestLoggerTest.php
+++ b/tests/unit/RequestLoggerTest.php
@@ -18,6 +18,8 @@
* Tests full text and completion search request logging. Could be expanded for
* other request types if necessary, but these are mostly the two we care
* about.
+ *
+ * @group CirrusSearch
*/
class RequestLoggerTest extends \MediaWikiTestCase {
public function requestLoggingProvider() {
diff --git a/tests/unit/RescoreBuilderTest.php
b/tests/unit/RescoreBuilderTest.php
index 2b1d387..6402be1 100644
--- a/tests/unit/RescoreBuilderTest.php
+++ b/tests/unit/RescoreBuilderTest.php
@@ -4,6 +4,9 @@
use CirrusSearch\Test\HashSearchConfig;
+/**
+ * @group CirrusSearch
+ */
class RescoreBuilderTest extends \PHPUnit_Framework_TestCase {
public function testFunctionScoreDecorator() {
$func = new FunctionScoreDecorator();
diff --git a/tests/unit/Search/EscaperTest.php
b/tests/unit/Search/EscaperTest.php
index 6e47d84..59a4d73 100644
--- a/tests/unit/Search/EscaperTest.php
+++ b/tests/unit/Search/EscaperTest.php
@@ -21,6 +21,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class EscaperTest extends PHPUnit_Framework_TestCase {
diff --git a/tests/unit/Search/FiltersTest.php
b/tests/unit/Search/FiltersTest.php
index 6086513..3a247cf 100644
--- a/tests/unit/Search/FiltersTest.php
+++ b/tests/unit/Search/FiltersTest.php
@@ -25,6 +25,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class FiltersTest extends PHPUnit_Framework_TestCase {
/**
diff --git a/tests/unit/Search/ResultTest.php b/tests/unit/Search/ResultTest.php
index 33e3ce0..d821167 100644
--- a/tests/unit/Search/ResultTest.php
+++ b/tests/unit/Search/ResultTest.php
@@ -2,6 +2,9 @@
namespace CirrusSearch\Search;
+/**
+ * @group CirrusSearch
+ */
class ResultTest extends \MediaWikiTestCase {
public function testInterwikiResults() {
$this->setMwGlobals( [
diff --git a/tests/unit/Search/ResultsTypeTest.php
b/tests/unit/Search/ResultsTypeTest.php
index 703cde5..a19d6f5 100644
--- a/tests/unit/Search/ResultsTypeTest.php
+++ b/tests/unit/Search/ResultsTypeTest.php
@@ -21,6 +21,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class ResultsTypeTest extends MediaWikiTestCase {
/**
diff --git a/tests/unit/Search/SearchFieldsTest.php
b/tests/unit/Search/SearchFieldsTest.php
index 37fd7af..eb91252 100644
--- a/tests/unit/Search/SearchFieldsTest.php
+++ b/tests/unit/Search/SearchFieldsTest.php
@@ -4,6 +4,9 @@
use SearchIndexField;
+/**
+ * @group CirrusSearch
+ */
class SearchFieldsTest extends \PHPUnit_Framework_TestCase {
public function getFields() {
@@ -41,4 +44,4 @@
$this->assertInstanceOf( \NullIndexField::class, $field );
$this->assertEquals( null, $field->getMapping( $engine ) );
}
-}
\ No newline at end of file
+}
diff --git a/tests/unit/SearchConfigTest.php b/tests/unit/SearchConfigTest.php
index 24f11c3..a15a37c 100644
--- a/tests/unit/SearchConfigTest.php
+++ b/tests/unit/SearchConfigTest.php
@@ -2,6 +2,9 @@
namespace CirrusSearch;
+/**
+ * @group CirrusSearch
+ */
class SearchConfigTest extends \MediaWikiTestCase {
public function testInterWikiConfig() {
$config = new SearchConfig();
diff --git a/tests/unit/SearcherTest.php b/tests/unit/SearcherTest.php
index 6cd4d30..bf36c96 100644
--- a/tests/unit/SearcherTest.php
+++ b/tests/unit/SearcherTest.php
@@ -5,6 +5,9 @@
use MediaWiki\MediaWikiServices;
use Title;
+/**
+ * @group CirrusSearch
+ */
class SearcherTest extends \MediaWikiTestCase {
public function searchTextProvider() {
$configs = [
diff --git a/tests/unit/SuggestBuilderTest.php
b/tests/unit/SuggestBuilderTest.php
index 0583d71..3c36006 100644
--- a/tests/unit/SuggestBuilderTest.php
+++ b/tests/unit/SuggestBuilderTest.php
@@ -25,6 +25,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class SuggestBuilderTest extends \MediaWikiTestCase {
public function testEinstein() {
diff --git a/tests/unit/SuggestScoringTest.php
b/tests/unit/SuggestScoringTest.php
index 6ad663a..3f36580 100644
--- a/tests/unit/SuggestScoringTest.php
+++ b/tests/unit/SuggestScoringTest.php
@@ -23,6 +23,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class SuggestScoringTest extends \MediaWikiTestCase {
public function testQualityScoreNormFunctions() {
diff --git a/tests/unit/UserTestingTest.php b/tests/unit/UserTestingTest.php
index e000320..4e5d9a5 100644
--- a/tests/unit/UserTestingTest.php
+++ b/tests/unit/UserTestingTest.php
@@ -19,6 +19,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class UserTestingTest extends \MediaWikiTestCase {
public function setUp() {
@@ -27,7 +29,7 @@
UserTesting::resetInstance();
}
- public function testPartitipcationInTest() {
+ public function testParticipationInTest() {
$config = $this->config( 'test' );
$ut = $this->ut( $config, true );
$this->assertEquals( true, $ut->isParticipatingIn( 'test' ) );
diff --git a/tests/unit/UtilTest.php b/tests/unit/UtilTest.php
index 211b2f6..3bd571c 100644
--- a/tests/unit/UtilTest.php
+++ b/tests/unit/UtilTest.php
@@ -24,6 +24,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @group CirrusSearch
*/
class UtilTest extends MediaWikiTestCase {
/**
--
To view, visit https://gerrit.wikimedia.org/r/321164
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I11cb005a43405aeb4b885128c6d167d4c4c21954
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Tjones <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits