Revert "merged master"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / GlobalTest.php
index 1938e67..746add5 100644 (file)
@@ -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;
@@ -102,7 +108,7 @@ class GlobalTest extends MediaWikiTestCase {
                        array( array( 'foo' => 1 ), 'foo=1' ), // number test
                        array( array( 'foo' => true ), 'foo=1' ), // true test
                        array( array( 'foo' => false ), '' ), // false test
-                       array( array( 'foo' => null ), '' ), // null test
+                       array( array( 'foo' => null ), 'foo' ), // null test
                        array( array( 'foo' => 'A&B=5+6@!"\'' ), 'foo=A%26B%3D5%2B6%40%21%22%27' ), // urlencoding test
                        array( array( 'foo' => 'bar', 'baz' => 'is', 'asdf' => 'qwerty' ), 'foo=bar&baz=is&asdf=qwerty' ), // multi-item test
                        array( array( 'foo' => array( 'bar' => 'baz' ) ), 'foo%5Bbar%5D=baz' ),
@@ -600,29 +606,19 @@ class GlobalTest extends MediaWikiTestCase {
                global $wgPhpCli;
                return array(
                        array( 'eval.php', array( '--help', '--test' ), array(),
-                               "$wgPhpCli eval.php '--help' '--test'",
+                               "'$wgPhpCli' 'eval.php' '--help' '--test'",
                                "Called eval.php --help --test" ),
                        array( 'eval.php', array( '--help', '--test space' ), array('php' => 'php5'),
-                               "php5 eval.php '--help' '--test space'",
+                               "'php5' 'eval.php' '--help' '--test space'",
                                "Called eval.php --help --test with php option" ),
                        array( 'eval.php', array( '--help', '--test', 'X' ), array('wrapper' => 'MWScript.php'),
-                               "$wgPhpCli MWScript.php eval.php '--help' '--test' 'X'",
+                               "'$wgPhpCli' 'MWScript.php' 'eval.php' '--help' '--test' 'X'",
                                "Called eval.php --help --test with wrapper option" ),
                        array( 'eval.php', array( '--help', '--test', 'y' ), array('php' => 'php5', 'wrapper' => 'MWScript.php'),
-                               "php5 MWScript.php eval.php '--help' '--test' 'y'",
+                               "'php5' 'MWScript.php' 'eval.php' '--help' '--test' 'y'",
                                "Called eval.php --help --test with wrapper and php option" ),
                );
        }
        /* TODO: many more! */
 }
 
-
-class MockOutputPage {
-       
-       public $message;
-       
-       function debug( $message ) {
-               $this->message = "JAJA is a stupid error message. Anyway, here's your message: $message";
-       }
-}
-