- Move Table to PhpMyAdmin namespace - Move Template to PhpMyAdmin namespace - Move ThemeManager to PhpMyAdmin namespace - Move Theme to PhpMyAdmin namespace - Move Tracker to PhpMyAdmin namespace - Move Transformations to PhpMyAdmin namespace - Move TypesMySQL to PhpMyAdmin namespace - Move Types to PhpMyAdmin namespace - Move Util to PhpMyAdmin namespace - Move VersionInformation to PhpMyAdmin namespace - Move Url to PhpMyAdmin namespace Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
58 lines
1.1 KiB
PHP
58 lines
1.1 KiB
PHP
<?php
|
|
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
|
/**
|
|
** Test for PhpMyAdmin\Util::generateHiddenMaxFileSize from Util.php
|
|
*
|
|
* @package PhpMyAdmin-test
|
|
* @group common.lib-tests
|
|
*/
|
|
|
|
/*
|
|
* Include to test.
|
|
*/
|
|
|
|
|
|
/**
|
|
** Test for PhpMyAdmin\Util::generateHiddenMaxFileSize from Util.php
|
|
*
|
|
* @package PhpMyAdmin-test
|
|
* @group common.lib-tests
|
|
*/
|
|
class PMA_GenerateHiddenMaxFileSize_Test extends PHPUnit_Framework_TestCase
|
|
{
|
|
|
|
/**
|
|
* Data provider for test
|
|
*
|
|
* @return array
|
|
*/
|
|
public function dataProvider()
|
|
{
|
|
return array(
|
|
array(10),
|
|
array("100"),
|
|
array(1024),
|
|
array("1024Mb"),
|
|
array(2147483648),
|
|
array("some_string")
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Test for generateHiddenMaxFileSize
|
|
*
|
|
* @param int $size Size
|
|
*
|
|
* @return void
|
|
*
|
|
* @dataProvider dataProvider
|
|
*/
|
|
function testGenerateHiddenMaxFileSize($size)
|
|
{
|
|
$this->assertEquals(
|
|
PhpMyAdmin\Util::generateHiddenMaxFileSize($size),
|
|
'<input type="hidden" name="MAX_FILE_SIZE" value="' . $size . '" />'
|
|
);
|
|
}
|
|
}
|