r12533 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12532‎ | r12533 | r12534 >
Date:22:31, 8 January 2006
Author:avar
Status:old
Tags:
Comment:
* An extension for the parsertests that modifies the date reported by the parser
Modified paths:
  • /trunk/phase3/maintenance/parserTestsParserTime.php (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTestsParserTime.php
@@ -0,0 +1,25 @@
 2+<?php
 3+if ( ! defined( 'MEDIAWIKI' ) )
 4+ die();
 5+/**
 6+ * A basic extension that's used by the parser tests to test date magic words
 7+ *
 8+ * Handy so that we don't have to upgrade the parsertests every second to
 9+ * compensate with the passage of time and certainly less expensive than a
 10+ * time-freezing device, get yours now!
 11+ *
 12+ * @package MediaWiki
 13+ * @subpackage Maintenance
 14+ *
 15+ * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
 16+ * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason
 17+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
 18+ */
 19+
 20+$wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup';
 21+
 22+function wfParserTimeSetup( &$parser, &$ts ) {
 23+ $ts = 123; //$ perl -le 'print scalar localtime 123' ==> Thu Jan 1 00:02:03 1970
 24+
 25+ return true;
 26+}
Property changes on: trunk/phase3/maintenance/parserTestsParserTime.php
___________________________________________________________________
Added: svn:eol-style
127 + native
Added: svn:keywords
228 + Author Date Id Revision

Follow-up revisions

RevisionCommit summaryAuthorDate
r73884Move parser test related stuff to tests directory...demon12:24, 28 September 2010

Status & tagging log