~ubuntu-branches/ubuntu/trusty/phpmyadmin/trusty

« back to all changes in this revision

Viewing changes to test/PMA_get_real_size_test.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2009-02-16 17:58:28 UTC
  • mfrom: (13.1.4 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090216175828-d2dllrukk9kecv4k
Tags: 4:3.1.2-2
* Upload to unstable.
* [INTL:es] Spanish debconf template update (Closes: #513690).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/* vim: expandtab sw=4 ts=4 sts=4: */
3
 
/**
4
 
 * tests for PMA_get_real_size()
5
 
 *
6
 
 * @version $Id: PMA_get_real_size_test.php 10146 2007-03-20 14:16:18Z cybot_tm $
7
 
 * @package phpMyAdmin-test
8
 
 */
9
 
 
10
 
/**
11
 
 *
12
 
 */
13
 
require_once 'PHPUnit/Framework.php';
14
 
require_once './libraries/core.lib.php';
15
 
 
16
 
class PMA_get_real_size_test extends PHPUnit_Framework_TestCase
17
 
{
18
 
    public function testNull()
19
 
    {
20
 
        $this->assertEquals(0, PMA_get_real_size('0'));
21
 
    }
22
 
 
23
 
    public function testKilobyte()
24
 
    {
25
 
        $this->assertEquals(1024, PMA_get_real_size('1kb'));
26
 
    }
27
 
 
28
 
    public function testKilobyte2()
29
 
    {
30
 
        $this->assertEquals(1024 * 1024, PMA_get_real_size('1024k'));
31
 
    }
32
 
 
33
 
    public function testMegabyte()
34
 
    {
35
 
        $this->assertEquals(8 * 1024 * 1024, PMA_get_real_size('8m'));
36
 
    }
37
 
 
38
 
    public function testGigabyte()
39
 
    {
40
 
        $this->assertEquals(12 * 1024 * 1024 * 1024, PMA_get_real_size('12gb'));
41
 
    }
42
 
}
43
 
?>
 
 
b'\\ No newline at end of file'