tests/unit/DisplayTest.php 1 location
|
@@ 8-19 (lines=12) @@
|
| 5 |
|
class DisplayTest extends PHPUnit_Framework_TestCase |
| 6 |
|
{ |
| 7 |
|
|
| 8 |
|
public function testGetReadableTime() |
| 9 |
|
{ |
| 10 |
|
$test_input = array( |
| 11 |
|
'.032432' => '32.432 ms', |
| 12 |
|
'24.3781' => '24.378 s', |
| 13 |
|
'145.123' => '2.419 m' |
| 14 |
|
); |
| 15 |
|
|
| 16 |
|
foreach ($test_input as $input => $expected_return) { |
| 17 |
|
$this->assertEquals($expected_return, Display::getReadableTime($input)); |
| 18 |
|
} |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
public function testGetReadableMemory() |
| 22 |
|
{ |
tests/unit/PhpQuickProfilerTest.php 1 location
|
@@ 24-35 (lines=12) @@
|
| 21 |
|
$this->assertAttributeEquals($startTime, 'startTime', $profiler); |
| 22 |
|
} |
| 23 |
|
|
| 24 |
|
public function testGetReadableTime() |
| 25 |
|
{ |
| 26 |
|
$test_input = array( |
| 27 |
|
'.032432' => '32.432 ms', |
| 28 |
|
'24.3781' => '24.378 s', |
| 29 |
|
'145.123' => '2.419 m' |
| 30 |
|
); |
| 31 |
|
|
| 32 |
|
foreach ($test_input as $input => $expected_return) { |
| 33 |
|
$this->assertEquals($expected_return, PhpQuickProfiler::getReadableTime($input)); |
| 34 |
|
} |
| 35 |
|
} |
| 36 |
|
} |
| 37 |
|
|