* The mtime of each module is now maxed with $wgCacheEpoch before being used. I chose to make this the caller's responsibility rather than getModifiedTime()'s, otherwise custom modules can (and inevitably will) forget to respect $wgCacheEpoch
* Invalidate message blobs if they're older than $wgCacheEpoch
* Added mediawiki.specials.search, which will eventually replace mediawiki.legacy.search
* Removed javascript injections in the body which were focusing the search box on load
* Added emulation for HTML5 autofocus attribute on the search page, this may be useful elsewhere and should be considered for use globally
= BacklinkCache.php =
* BacklinkCache class
** Set a few otherwise unset varables ($wgContLang & $wgMemc in
BacklinkCache)
= testHelpers.inc =
* TectRecorder class
** TestRecorder::record() accept and use a recorder object
** change TestFileIterator::setParser use a MediaWikiParserTest instead
of ParserTest
= parserTest.inc =
* ParserTest class
** Make $ParserTest->regex and $ParsaerTest->savedGlobals member
variables available to stop warnings.
** Force ParserTest::$showProgress and $showFailure to false
** Set ParserTest::$uploadDir on time
** Move ParserTest::chomp() and addArticle() to bootstrap for
MediaWikiTestSetup.
** Update ParserTest::runTest so that Success and Failure are reported
via reporter->showsTestResult() or ParserTestSuiteBackend::show*()
as needed.
** Set $ParserTest->uploadDir with setupUploadDir()
** Change ParserTest->setupGlobals() so that $wgDBprefix doesn't get
to set to the “parsertest_” bits.
** Sprinkle $this->teardownGlobals() at exit points in
ParserTest->teardownDatabase()
= bootstrap.php =
* MediaWikiTestSetup class
** Make member variables MediaWikiTestSetup::$suite,
MediaW* Make member variables MediaWikiTestSetup::$suite,
MediaWikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
* Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
* Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
* Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
* Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
** Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
** Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
** Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
** Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserTestSuiteBackend::runTest()
* ParserTestSuiteBackend class
** extends PHPUnit_FrameWork_TestSuite instead of ParserTest
** Add member variables $recorder, $term, and $usePHPUnit
** Add a constructor that determines if PHPUnit is usewd.
** Add a method showTestResult() that can be used to show success or
failure
** Change showSucess and showFailure() to be static and use identical
arguments and only use PHPUnit_Framework_Assert::assertEquals
when PHPUnit is in use.
= SearchEngineTest.php =
** Fix path in require to bootstrap.php
* BacklinkCache class
** Set a few otherwise unset varables ($wgContLang & $wgMemc in
BacklinkCache)
= testHelpers.inc =
* TectRecorder class
** TestRecorder::record() accept and use a recorder object
** change TestFileIterator::setParser use a MediaWikiParserTest instead
of ParserTest
= parserTest.inc =
* ParserTest class
** Make $ParserTest->regex and $ParsaerTest->savedGlobals member
variables available to stop warnings.
** Force ParserTest::$showProgress and $showFailure to false
** Set ParserTest::$uploadDir on time
** Move ParserTest::chomp() and addArticle() to bootstrap for
MediaWikiTestSetup.
** Update ParserTest::runTest so that Success and Failure are reported
via reporter->showsTestResult() or ParserTestSuiteBackend::show*()
as needed.
** Set $ParserTest->uploadDir with setupUploadDir()
** Change ParserTest->setupGlobals() so that $wgDBprefix doesn't get
to set to the “parsertest_” bits.
** Sprinkle $this->teardownGlobals() at exit points in
ParserTest->teardownDatabase()
= bootstrap.php =
* MediaWikiTestSetup class
** Make member variables MediaWikiTestSetup::$suite,
MediaW* Make member variables MediaWikiTestSetup::$suite,
MediaWikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
* Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
* Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
* Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
* Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
** Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
** Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
** Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
** Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserTestSuiteBackend::runTest()
* ParserTestSuiteBackend class
** extends PHPUnit_FrameWork_TestSuite instead of ParserTest
** Add member variables $recorder, $term, and $usePHPUnit
** Add a constructor that determines if PHPUnit is usewd.
** Add a method showTestResult() that can be used to show success or
failure
** Change showSucess and showFailure() to be static and use identical
arguments and only use PHPUnit_Framework_Assert::assertEquals
when PHPUnit is in use.
= SearchEngineTest.php =
** Fix path in require to bootstrap.php
popen() doesn't like two-letter modes but the approach checked for it at
too high level, used as mode the letter t, not r, which was an invalid
option for SevenZipStream, and is still an invalid argument for popen.
Looks like somebody's snuck a bunch of destructive tests into the default PHPUnit test suite;
this is unsafe and could cause admins and developers to damage their wikis contents accidentally,
not realizing that their main page will be deleted etc.
Tests should be split up into those which alter the live database and those that don't; only
those which are non-destructive should run unless explicitly requested.