2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Test for PMA_displayMaximumUploadSize from common.lib.php
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_displayMaximumUploadSize_test.php
8 * @group common.lib-tests
14 require_once 'libraries/common.lib.php';
16 class PMA_displayMaximumUploadSize_test
extends PHPUnit_Framework_TestCase
{
19 * Data provider for test
21 public function dataProvider() {
23 array(10, __('B'), "10"),
24 array(100, __('B'), "100"),
25 array(1024, __('B'), "1,024"),
26 array(102400, __('KiB'), "100"),
27 array(10240000, __('MiB'), "10"),
28 array(2147483648, __('MiB'), "2,048"),
29 array(21474836480, __('GiB'), "20")
34 * @dataProvider dataProvider
37 function testMaximumUploadSize($size, $unit, $res){
38 $this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));