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' ),
23
array( '1K', 1024, 'One kb uppercased' ),
24
array( '1k', 1024, 'One kb lowercased' ),