Various fixes for PHPUnit tests:
authorPaul Copperman <pcopp@users.mediawiki.org>
Thu, 7 Apr 2011 14:54:38 +0000 (14:54 +0000)
committerPaul Copperman <pcopp@users.mediawiki.org>
Thu, 7 Apr 2011 14:54:38 +0000 (14:54 +0000)
commitf7e6dfb4a33b2fd4dabf613d69e1824e39772aa6
tree8c969f75c6c19f34e37244a2abe1dfdcb8a50322
parent672e9f6a2ad2cd6b859d6c435529dc5c06b83240
Various fixes for PHPUnit tests:

* Block.php: Set mExpiry to the value we store in the database, so that Block::equals() returns true. Fixes BlockTest::testInitializerFunctionsReturnCorrectBlock.
* In Title::checkUserBlock(): Convert message parameters to plain strings to make strict comparisons work. Fixes TitlePermissionTest::testUserBlock().
* ApiBlock.php: Follow-Up r85166, add 'Confirm' parameter to data array. Fixes ApiBlockTest::testMakeNormalBlock().
* ApiQueryTest.php: Use $wgMetaNamespace instead of $wgSitename to account for customizations.
* RandomImageGenerator.php: Use default value for constructor param to prevent fatals.
* ApiTestCaseUpload.php:
** Fix undefined variable $fileName.
** Remove stray ini_set statements, they don't belong there. Especially ini_set( 'error_reporting', 1 ) will effectively disable all reporting, which makes errors hard to track.
* ArticleTablesTest.php: Put testbug14404() in group Broken, as the fix for the bug has been reverted in r83868.
includes/Block.php
includes/Title.php
includes/api/ApiBlock.php
tests/phpunit/includes/ArticleTablesTest.php
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/api/ApiQueryTest.php
tests/phpunit/includes/api/ApiTestCaseUpload.php
tests/phpunit/includes/api/RandomImageGenerator.php