Fixed: Not selecting a datalabel used to issue a notice(undefined offset)
[phpmyadmin/ammaryasirr.git] / test / libraries / common / PMA_displayMaximumUploadSize_test.php
blob57af20857d33f4af2401aca5b1263edf85b916ec
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
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
9 */
12 * Include to test.
14 require_once 'libraries/common.lib.php';
16 class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase
20 * Data provider for test
22 public function dataProvider() {
23 return array(
24 array(10, __('B'), "10"),
25 array(100, __('B'), "100"),
26 array(1024, __('B'), "1,024"),
27 array(102400, __('KiB'), "100"),
28 array(10240000, __('MiB'), "10"),
29 array(2147483648, __('MiB'), "2,048"),
30 array(21474836480, __('GiB'), "20")
34 /**
35 * @dataProvider dataProvider
36 * @return void
38 function testMaximumUploadSize($size, $unit, $res){
39 $this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));