Improve documentation of maintenance scripts and test suite.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 2 Oct 2012 20:24:33 +0000 (22:24 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 2 Oct 2012 20:24:33 +0000 (22:24 +0200)
Change-Id: If5d695dc3665635fbed73a713583c0b03c14ebb1

maintenance/term/MWTerm.php
mw-config/index.php
mw-config/index.php5
mw-config/overrides.php
resources/Resources.php
serialized/serialize.php
tests/TestsAutoLoader.php
tests/parser/parserTest.inc
tests/testHelpers.inc

index ca0f95d..1cb97f9 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @ingroup Testing
+ * @ingroup Maintenance Testing
  * @todo Fixme: Make this more generic
  */
 
 /**
  * Terminal that supports ANSI escape sequences.
+ *
+ * @ingroup Maintenance Testing
  */
 class AnsiTermColorer {
        function __construct() {
@@ -56,6 +58,8 @@ class AnsiTermColorer {
 
 /**
  * A colour-less terminal
+ *
+ * @ingroup Maintenance Testing
  */
 class DummyTermColorer {
        public function color( $color ) {
index 065d187..2823210 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * New version of MediaWiki web-based config/installation
  *
+ * 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
  */
 
index 8e6ceda..8e9c368 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Version of mw-config/index.php to used in web server requiring .php5
+ * extension to execute scripts with PHP5 egine.
+ *
+ * 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
+ */
 
 define('MW_INSTALL_PHP5_EXT', 1);
 require './index.php';
index ae98295..d3d85bb 100644 (file)
@@ -5,6 +5,23 @@
  * Altering it is preferred over changing anything in /includes.
  *
  * Note: this file doesn't gets included from a global scope, don't use globals directly.
+ *
+ * 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
  */
 
 /*
index 1910672..cccc645 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/**
+ * Definition of core ResourceLoader modules.
+ *
+ * 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
+ */
 
 return array(
 
index 0e0ce80..0be614a 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Serialize variables found in input file and store the result in the
+ * specified file.
+ *
+ * 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
+ */
 
 if ( !defined( 'MEDIAWIKI' ) ) {
        $wgNoDBParam = true;
@@ -62,7 +83,7 @@ function unixLineEndings( $var ) {
                fwrite( $stderr, "Error: Recursion limit exceeded. Possible circular reference in array variable.\n" );
                exit( 2 );
        }
-       
+
        if ( is_array( $var ) ) {
                ++$recursionLevel;
                $var = array_map( 'unixLineEndings', $var );
index 42f5f68..2fc8907 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * AutoLoader for the testing suite.
+ *
+ * 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
+ * @ingroup Testing
+ */
 
 global $wgAutoloadClasses;
 $testFolder = __DIR__;
index cd59833..10ca5a5 100644 (file)
@@ -1,23 +1,25 @@
 <?php
-# Copyright (C) 2004, 2010 Brion Vibber <brion@pobox.com>
-# http://www.mediawiki.org/
-#
-# 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
-
 /**
+ * Helper code for the MediaWiki parser test suite.
+ *
+ * Copyright © 2004, 2010 Brion Vibber <brion@pobox.com>
+ * http://www.mediawiki.org/
+ *
+ * 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
+ *
  * @todo Make this more independent of the configuration (and if possible the database)
  * @todo document
  * @file
index 39e18c9..4b2e923 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Recording for passing/failing tests.
+ *
+ * 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
+ * @ingroup Testing
+ */
 
 class TestRecorder {
        var $parent;
@@ -483,7 +504,7 @@ class TestFileIterator implements Iterator {
        private function clearSection() {
                $this->sectionData = array();
                $this->section = null;
-               
+
        }
 
        /**
@@ -492,7 +513,7 @@ class TestFileIterator implements Iterator {
         * Throw an exception if it is not set, referencing current section
         * and adding the current file name and line number
         *
-        * @param $token String: expected token that should have been mentionned before closing this section 
+        * @param $token String: expected token that should have been mentionned before closing this section
         */
        private function checkSection( $token ) {
                if( is_null( $this->section ) ) {
@@ -536,7 +557,7 @@ class DelayedParserTest {
 
        /**
         * Called whenever we actually want to run the hook.
-        * Should be the case if we found the parserTest is not disabled 
+        * Should be the case if we found the parserTest is not disabled
         */
        public function unleash( &$parserTest ) {
                if( !($parserTest instanceof ParserTest || $parserTest instanceof NewParserTest