dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wfBaseConvert(): Work around PHP Bug #50175
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
GlobalFunctions
/
wfBaseConvertTest.php
diff --git
a/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php
b/tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php
index
dd4f9cc
..
9d55e85
100644
(file)
--- 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 ) )
);
}
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 ) );
+ }
}
}