| 1 | <?php |
||
| 5 | use PHPUnit_Framework_TestCase; |
||
| 6 | |||
| 7 | class DisplayTest extends PHPUnit_Framework_TestCase |
||
| 8 | { |
||
| 9 | |||
| 10 | public function testGetReadableTime() |
||
| 22 | |||
| 23 | public function testGetReadableMemory() |
||
| 24 | { |
||
| 25 | $test_input = array( |
||
| 26 | '314' => '314 b', |
||
| 27 | '7403' => '7.23 k', |
||
| 28 | '2589983' => '2.47 M' |
||
| 29 | ); |
||
| 30 | |||
| 31 | foreach ($test_input as $input => $expected_return) { |
||
| 32 | $this->assertEquals($expected_return, Display::getReadableMemory($input)); |
||
| 33 | } |
||
| 34 | } |
||
| 36 |