* upgrade patches for oracle 1.17->1.19
[mediawiki.git] / tests / phpunit / includes / JsonTest.php
blobbec755db21caf2756c1dd3344affe725b5766eb3
1 <?php
3 class JsonTest extends MediaWikiTestCase {
5 function testPHPBug46944Test() {
7 $this->assertNotEquals(
8 '\ud840\udc00',
9 strtolower( FormatJson::encode( "\xf0\xa0\x80\x80" ) ),
10 'Test encoding an broken json_encode character (U+20000)'
16 function testDecodeVarTypes() {
18 $this->assertInternalType(
19 'object',
20 FormatJson::decode( '{"Name": "Cheeso", "Rank": 7}' ),
21 'Default to object'
24 $this->assertInternalType(
25 'array',
26 FormatJson::decode( '{"Name": "Cheeso", "Rank": 7}', true ),
27 'Optional array'