jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375843 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
......................................................................


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

Change-Id: Ifa3cbf5544d52401526ffa111e0358f11e5e91ad
---
M composer.json
M phpcs.xml
M tests/HtmlFormatterTest.php
A tests/MockHtmlFormatter.php
4 files changed, 44 insertions(+), 11 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 23a6297..93b2b3d 100644
--- a/composer.json
+++ b/composer.json
@@ -17,10 +17,15 @@
                "php": ">=5.5",
                "ext-mbstring": "*"
        },
+       "autoload-dev": {
+               "classmap": [
+                       "tests/MockHtmlFormatter.php"
+               ]
+       },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "phpunit/phpunit": "4.7.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.0"
+               "mediawiki/mediawiki-codesniffer": "0.12.0"
        },
        "scripts": {
                "test": [
diff --git a/phpcs.xml b/phpcs.xml
index 75d76b2..db7add3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <ruleset name="HtmlFormatter">
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
        <file>.</file>
        <exclude-pattern>coverage</exclude-pattern>
        <exclude-pattern>vendor</exclude-pattern>
diff --git a/tests/HtmlFormatterTest.php b/tests/HtmlFormatterTest.php
index 98f59d2..c27d802 100644
--- a/tests/HtmlFormatterTest.php
+++ b/tests/HtmlFormatterTest.php
@@ -122,12 +122,3 @@
                $this->assertFalse( $f->hasDoc, 'HtmlFormatter should not 
needlessly parse HTML' );
        }
 }
-
-class MockHtmlFormatter extends HtmlFormatter {
-       public $hasDoc = false;
-
-       public function getDoc() {
-               $this->hasDoc = true;
-               return parent::getDoc();
-       }
-}
diff --git a/tests/MockHtmlFormatter.php b/tests/MockHtmlFormatter.php
new file mode 100644
index 0000000..2ed37a2
--- /dev/null
+++ b/tests/MockHtmlFormatter.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * 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
+ *
+ * @file
+ */
+
+namespace HtmlFormatter\Test;
+
+use HtmlFormatter\HtmlFormatter;
+
+class MockHtmlFormatter extends HtmlFormatter {
+       public $hasDoc = false;
+
+       /**
+        * Override to check whether this function was called
+        *
+        * @return \DOMDocument
+        */
+       public function getDoc() {
+               $this->hasDoc = true;
+               return parent::getDoc();
+       }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa3cbf5544d52401526ffa111e0358f11e5e91ad
Gerrit-PatchSet: 2
Gerrit-Project: HtmlFormatter
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to