MediaWiki  1.23.0
wfShorthandToIntegerTest.php
Go to the documentation of this file.
1 <?php
2 
10  public function testWfShorthandToInteger( $input, $output, $description ) {
11  $this->assertEquals(
12  wfShorthandToInteger( $input ),
13  $output,
14  $description
15  );
16  }
17 
18  public static function provideABunchOfShorthands() {
19  return array(
20  array( '', -1, 'Empty string' ),
21  array( ' ', -1, 'String of spaces' ),
22  array( '1G', 1024 * 1024 * 1024, 'One gig uppercased' ),
23  array( '1g', 1024 * 1024 * 1024, 'One gig lowercased' ),
24  array( '1M', 1024 * 1024, 'One meg uppercased' ),
25  array( '1m', 1024 * 1024, 'One meg lowercased' ),
26  array( '1K', 1024, 'One kb uppercased' ),
27  array( '1k', 1024, 'One kb lowercased' ),
28  );
29  }
30 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
WfShorthandToIntegerTest
@covers wfShorthandToInteger
Definition: wfShorthandToIntegerTest.php:6
WfShorthandToIntegerTest\provideABunchOfShorthands
static provideABunchOfShorthands()
Definition: wfShorthandToIntegerTest.php:18
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
wfShorthandToInteger
wfShorthandToInteger( $string='')
Converts shorthand byte notation to integer form.
Definition: GlobalFunctions.php:3889
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
WfShorthandToIntegerTest\testWfShorthandToInteger
testWfShorthandToInteger( $input, $output, $description)
@dataProvider provideABunchOfShorthands
Definition: wfShorthandToIntegerTest.php:10
$output
& $output
Definition: hooks.txt:375