2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Test for PMA_extractValueFromFormattedSize from common.lib
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_extractValueFromFormattedSize_test.php
8 * @group common.lib-tests
14 require_once 'libraries/common.lib.php';
16 class PMA_extractValueFromFormattedSize_test
extends PHPUnit_Framework_TestCase
{
18 function testExtractValueFromFormattedSizeNoFormat(){
20 $this->assertEquals(-1,PMA_extractValueFromFormattedSize(100));
23 function testExtractValueFromFormattedSizeGB(){
25 $this->assertEquals(10737418240,PMA_extractValueFromFormattedSize("10GB"));
28 function testExtractValueFromFormattedSizeMB(){
30 $this->assertEquals(15728640,PMA_extractValueFromFormattedSize("15MB"));
33 function testExtractValueFromFormattedSizeK(){
35 $this->assertEquals(262144,PMA_extractValueFromFormattedSize("256K"));