bbe62792e7f6c1bdd984873ec513bb0e592d1d99
3 class wfShorthandToIntegerTest
extends MediaWikiTestCase
{
5 * @dataProvider provideABunchOfShorthands
7 function testWfShorthandToInteger( $input, $output, $description ) {
9 wfShorthandToInteger( $input ),
15 function provideABunchOfShorthands() {
17 array( '', -1, 'Empty string' ),
18 array( ' ', -1, 'String of spaces' ),
19 array( '1G', 1024 * 1024 * 1024, 'One gig uppercased' ),
20 array( '1g', 1024 * 1024 * 1024, 'One gig lowercased' ),
21 array( '1M', 1024 * 1024, 'One meg uppercased' ),
22 array( '1m', 1024 * 1024, 'One meg lowercased' ),