X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FGlobalFunctions%2FwfBaseConvertTest.php;h=9d55e85c81e062f40ed67855ebedff6d1c68972e;hb=5957856c46c3;hp=dd4f9ccfa4f572f307e854e2215e41b90ee21b29;hpb=d78b4eeff8cdf47ba6f5da1257c4a6e9de688316;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php b/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php index dd4f9ccfa4..9d55e85c81 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php @@ -186,4 +186,10 @@ class WfBaseConvertTest extends MediaWikiTestCase { strlen( wfBaseConvert( $number, 2, 2, strlen( $number ) - 5 ) ) ); } + + public function testLeadingZero() { + $this->assertSame( '24', wfBaseConvert( '010', 36, 16 ) ); + $this->assertSame( '37d4', wfBaseConvert( '0b10', 36, 16 ) ); + $this->assertSame( 'a734', wfBaseConvert( '0x10', 36, 16 ) ); + } }