From 01f11f8e989a125808e7110413887e5ac3e206e5 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 2 Oct 2012 22:24:33 +0200 Subject: [PATCH] Improve documentation of maintenance scripts and test suite. Change-Id: If5d695dc3665635fbed73a713583c0b03c14ebb1 --- maintenance/term/MWTerm.php | 6 +++++- mw-config/index.php | 15 +++++++++++++++ mw-config/index.php5 | 21 ++++++++++++++++++++ mw-config/overrides.php | 17 +++++++++++++++++ resources/Resources.php | 20 +++++++++++++++++++ serialized/serialize.php | 23 +++++++++++++++++++++- tests/TestsAutoLoader.php | 21 ++++++++++++++++++++ tests/parser/parserTest.inc | 38 +++++++++++++++++++------------------ tests/testHelpers.inc | 27 +++++++++++++++++++++++--- 9 files changed, 165 insertions(+), 23 deletions(-) diff --git a/maintenance/term/MWTerm.php b/maintenance/term/MWTerm.php index ca0f95d235..1cb97f971c 100644 --- a/maintenance/term/MWTerm.php +++ b/maintenance/term/MWTerm.php @@ -19,12 +19,14 @@ * 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 ) { diff --git a/mw-config/index.php b/mw-config/index.php index 065d187934..2823210acb 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -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 */ diff --git a/mw-config/index.php5 b/mw-config/index.php5 index 8e6ceda94c..8e9c36883f 100644 --- a/mw-config/index.php5 +++ b/mw-config/index.php5 @@ -1,4 +1,25 @@ -# 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 + * 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 diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index 39e18c920d..4b2e923abf 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -1,4 +1,25 @@ 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 -- 2.20.1