aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiQueryTest.php
diff options
context:
space:
mode:
authorPaul Copperman <pcopp@users.mediawiki.org>2011-04-07 14:54:38 +0000
committerPaul Copperman <pcopp@users.mediawiki.org>2011-04-07 14:54:38 +0000
commitf7e6dfb4a33b2fd4dabf613d69e1824e39772aa6 (patch)
tree8c969f75c6c19f34e37244a2abe1dfdcb8a50322 /tests/phpunit/includes/api/ApiQueryTest.php
parent672e9f6a2ad2cd6b859d6c435529dc5c06b83240 (diff)
downloadmediawikicore-f7e6dfb4a33b2fd4dabf613d69e1824e39772aa6.tar.gz
mediawikicore-f7e6dfb4a33b2fd4dabf613d69e1824e39772aa6.zip
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.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85618
Diffstat (limited to 'tests/phpunit/includes/api/ApiQueryTest.php')
-rw-r--r--tests/phpunit/includes/api/ApiQueryTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/api/ApiQueryTest.php b/tests/phpunit/includes/api/ApiQueryTest.php
index 9e857048868f..5c9ef93b9bc1 100644
--- a/tests/phpunit/includes/api/ApiQueryTest.php
+++ b/tests/phpunit/includes/api/ApiQueryTest.php
@@ -14,7 +14,7 @@ class ApiQueryTest extends ApiTestSetup {
function testTitlesGetNormalized() {
- global $wgSitename;
+ global $wgMetaNamespace;
$data = $this->doApiRequest( array(
'action' => 'query',
@@ -27,7 +27,7 @@ class ApiQueryTest extends ApiTestSetup {
$this->assertEquals(
array(
'from' => 'Project:articleA',
- 'to' => $wgSitename . ':ArticleA'
+ 'to' => $wgMetaNamespace . ':ArticleA'
),
$data[0]['query']['normalized'][0]
);