Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/366891 )

Change subject: Hygiene: Define PHPUnit group for unit tests
......................................................................

Hygiene: Define PHPUnit group for unit tests

While testing different extensions which depend upon BetaFeatures
extension it should be possible to narrow tests to specific extension
only. To do that unit test have to specify the group they belong.

Changes:
 - introduced group called BetaFeatures
 - added @group annotation to every BetaFeatures unit tests

Change-Id: I58848f46a32fc39238d30d023c3e321502643900
---
M tests/phpunit/AutoEnrollmentTest.php
M tests/phpunit/BetaFeaturesTestCase.php
M tests/phpunit/DependentFeatureTest.php
M tests/phpunit/HTMLFeatureFieldTest.php
M tests/phpunit/HTMLHorizontalRuleTest.php
M tests/phpunit/HTMLTextBlockTest.php
M tests/phpunit/HooksRunTest.php
M tests/phpunit/NewHTMLCheckFieldTest.php
M tests/phpunit/PreferenceHandlingTest.php
9 files changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures 
refs/changes/91/366891/1

diff --git a/tests/phpunit/AutoEnrollmentTest.php 
b/tests/phpunit/AutoEnrollmentTest.php
index f397a1c..3b801dd 100644
--- a/tests/phpunit/AutoEnrollmentTest.php
+++ b/tests/phpunit/AutoEnrollmentTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class AutoEnrollmentTest extends BetaFeaturesTestCase {
 
        // Structure of testing preference
diff --git a/tests/phpunit/BetaFeaturesTestCase.php 
b/tests/phpunit/BetaFeaturesTestCase.php
index e884450..47a9113 100644
--- a/tests/phpunit/BetaFeaturesTestCase.php
+++ b/tests/phpunit/BetaFeaturesTestCase.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class BetaFeaturesTestCase extends MediaWikiTestCase {
 
        protected function setUp() {
diff --git a/tests/phpunit/DependentFeatureTest.php 
b/tests/phpunit/DependentFeatureTest.php
index c2f45c7..bc9f8bf 100644
--- a/tests/phpunit/DependentFeatureTest.php
+++ b/tests/phpunit/DependentFeatureTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class DependentFeatureTest extends BetaFeaturesTestCase {
 
        // Key for testing preference
diff --git a/tests/phpunit/HTMLFeatureFieldTest.php 
b/tests/phpunit/HTMLFeatureFieldTest.php
index de01c0a..bbbf8c8 100644
--- a/tests/phpunit/HTMLFeatureFieldTest.php
+++ b/tests/phpunit/HTMLFeatureFieldTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class HTMLFeatureFieldTest extends MediaWikiTestCase {
 
        public function testCreatingFieldGivesExpectedStrings() {
diff --git a/tests/phpunit/HTMLHorizontalRuleTest.php 
b/tests/phpunit/HTMLHorizontalRuleTest.php
index 06be579..5b27836 100644
--- a/tests/phpunit/HTMLHorizontalRuleTest.php
+++ b/tests/phpunit/HTMLHorizontalRuleTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class HTMLHorizontalRuleFieldTest extends MediaWikiTestCase {
 
        public function testCreatingFieldGivesExpectedStrings() {
diff --git a/tests/phpunit/HTMLTextBlockTest.php 
b/tests/phpunit/HTMLTextBlockTest.php
index f526106..3de29c8 100644
--- a/tests/phpunit/HTMLTextBlockTest.php
+++ b/tests/phpunit/HTMLTextBlockTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class HTMLTextBlockFieldTest extends MediaWikiTestCase {
 
        public function testCreatingFieldGivesExpectedStrings() {
diff --git a/tests/phpunit/HooksRunTest.php b/tests/phpunit/HooksRunTest.php
index 94b970f..15727e0 100644
--- a/tests/phpunit/HooksRunTest.php
+++ b/tests/phpunit/HooksRunTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class HooksRunTest extends MediaWikiTestCase {
 
        // Key for testing preference
diff --git a/tests/phpunit/NewHTMLCheckFieldTest.php 
b/tests/phpunit/NewHTMLCheckFieldTest.php
index 5fd25b6..f0671de 100644
--- a/tests/phpunit/NewHTMLCheckFieldTest.php
+++ b/tests/phpunit/NewHTMLCheckFieldTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class NewHTMLCheckFieldTest extends MediaWikiTestCase {
 
        public function testCreatingFieldGivesExpectedStrings() {
diff --git a/tests/phpunit/PreferenceHandlingTest.php 
b/tests/phpunit/PreferenceHandlingTest.php
index 103a451..a36532f 100644
--- a/tests/phpunit/PreferenceHandlingTest.php
+++ b/tests/phpunit/PreferenceHandlingTest.php
@@ -23,6 +23,9 @@
  * @license GNU General Public License version 2 or later
  */
 
+/**
+ * @group BetaFeatures
+ */
 class PreferenceHandlingTest extends BetaFeaturesTestCase {
 
        const testPrefKey = 'unittest';

-- 
To view, visit https://gerrit.wikimedia.org/r/366891
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58848f46a32fc39238d30d023c3e321502643900
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Pmiazga <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to