diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2005-05-31 11:54:36 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2005-05-31 11:54:36 +0000 |
commit | fe40fe9da89278bc33549162f46490af91e60d11 (patch) | |
tree | 6d3bdd33d709948ee5cc2328a3e6d152cd0ca46f /tests/GlobalTest.php | |
parent | 74be16a230ad896548078b27a6d91b3b70f28d44 (diff) | |
download | mediawikicore-fe40fe9da89278bc33549162f46490af91e60d11.tar.gz mediawikicore-fe40fe9da89278bc33549162f46490af91e60d11.zip |
* Replace wfMungeToUtf8 and do_html_entity_decode with a single function
that does both numeric and named chars: Sanitizer::decodeCharReferences
* Removed some obsolete UTF-8 converter functions
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/9284
Diffstat (limited to 'tests/GlobalTest.php')
-rw-r--r-- | tests/GlobalTest.php | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/GlobalTest.php b/tests/GlobalTest.php index a7da66a069cb..b0ed0f5fae0e 100644 --- a/tests/GlobalTest.php +++ b/tests/GlobalTest.php @@ -27,18 +27,6 @@ class GlobalTest extends PHPUnit_TestCase { } } - function testDecodeLatin() { - $this->assertEquals( - "\xe9cole", - do_html_entity_decode( 'école', ENT_COMPAT, 'iso-8859-1' ) ); - } - - function testDecodeUnicode() { - $this->assertEquals( - "\xc3\xa9cole", - do_html_entity_decode( 'école', ENT_COMPAT, 'utf-8' ) ); - } - function testRandom() { # This could hypothetically fail, but it shouldn't ;) $this->assertFalse( @@ -51,42 +39,6 @@ class GlobalTest extends PHPUnit_TestCase { wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) ); } - function testUtf8Sequence1() { - $this->assertEquals( - 'A', - wfUtf8Sequence( 65 ) ); - } - - function testUtf8Sequence2() { - $this->assertEquals( - "\xc4\x88", - wfUtf8Sequence( 0x108 ) ); - } - - function testUtf8Sequence3() { - $this->assertEquals( - "\xe3\x81\x8b", - wfUtf8Sequence( 0x304b ) ); - } - - function testUtf8Sequence4() { - $this->assertEquals( - "\xf0\x90\x91\x90", - wfUtf8Sequence( 0x10450 ) ); - } - - function testMungeToUtf8() { - $this->assertEquals( - "\xc4\x88io bonas dans l'\xc3\xa9cole!", - wfMungeToUtf8( "Ĉio bonas dans l'école!" ) ); - } - - function testUtf8ToHTML() { - $this->assertEquals( - "Ĉio bonas dans l'école!", - wfUtf8ToHTML( "\xc4\x88io bonas dans l'\xc3\xa9cole!" ) ); - } - function testReadOnlyEmpty() { $this->assertFalse( wfReadOnly() ); } |