Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / libraries / common / PMA_displayMaximumUploadSize_test.php
blobad93ddb4f3423cfed20c1b9c7e242d867ceb05b1
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{
19 * Data provider for test
21 public function dataProvider() {
22 return array(
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")
33 /**
34 * @dataProvider dataProvider
35 * @return void
37 function testMaximumUploadSize($size, $unit, $res){
38 $this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));