From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- .../includes/GlobalFunctions/GlobalTest.php | 46 ++++------------------ 1 file changed, 8 insertions(+), 38 deletions(-) (limited to 'tests/phpunit/includes/GlobalFunctions/GlobalTest.php') diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 3cb42f12..9097d301 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -55,6 +55,12 @@ class GlobalTest extends MediaWikiTestCase { wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) ); } + function testExpandIRI() { + $this->assertEquals( + "https://te.wikibooks.org/wiki/ఉబుంటు_వాడుకరి_మార్గదర్శని", + wfExpandIRI( "https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF" ) ); + } + function testReadOnlyEmpty() { global $wgReadOnly; $wgReadOnly = null; @@ -305,7 +311,7 @@ class GlobalTest extends MediaWikiTestCase { function testDebugFunctionTest() { - global $wgDebugLogFile, $wgOut, $wgShowDebug, $wgDebugTimestamps; + global $wgDebugLogFile, $wgDebugTimestamps; $old_log_file = $wgDebugLogFile; $wgDebugLogFile = tempnam( wfTempDir(), 'mw-' ); @@ -327,33 +333,7 @@ class GlobalTest extends MediaWikiTestCase { wfDebug( "\00305This has böth UTF and control chars\003" ); $this->assertEquals( " 05This has böth UTF and control chars ", file_get_contents( $wgDebugLogFile ) ); unlink( $wgDebugLogFile ); - - - - $old_wgOut = $wgOut; - $old_wgShowDebug = $wgShowDebug; - - $wgOut = new MockOutputPage; - - $wgShowDebug = true; - - $message = "\00305This has böth UTF and control chars\003"; - - wfDebug( $message ); - - if( $wgOut->message == "JAJA is a stupid error message. Anyway, here's your message: $message" ) { - $this->assertTrue( true, 'MockOutputPage called, set the proper message.' ); - } - else { - $this->assertTrue( false, 'MockOutputPage was not called.' ); - } - - $wgOut = $old_wgOut; - $wgShowDebug = $old_wgShowDebug; - unlink( $wgDebugLogFile ); - - - + wfDebugMem(); $this->assertGreaterThan( 5000, preg_replace( '/\D/', '', file_get_contents( $wgDebugLogFile ) ) ); unlink( $wgDebugLogFile ); @@ -616,13 +596,3 @@ class GlobalTest extends MediaWikiTestCase { /* TODO: many more! */ } - -class MockOutputPage { - - public $message; - - function debug( $message ) { - $this->message = "JAJA is a stupid error message. Anyway, here's your message: $message"; - } -} - -- cgit v1.2.2