@@ 245-259 (lines=15) @@ | ||
242 | $this->assertCount(1, $filteredMessages); |
|
243 | } |
|
244 | ||
245 | public function testGetReadableTime() |
|
246 | { |
|
247 | $timeTest = array( |
|
248 | '.032432' => '32 ms', |
|
249 | '24.3781' => '24.378 s', |
|
250 | '145.123' => '2.419 m' |
|
251 | ); |
|
252 | $display = new Display(); |
|
253 | $reflectedMethod = $this->getAccessibleMethod($display, 'getReadableTime'); |
|
254 | ||
255 | foreach ($timeTest as $rawTime => $expectedTime) { |
|
256 | $readableTime = $reflectedMethod->invokeArgs($display, array($rawTime)); |
|
257 | $this->assertEquals($expectedTime, $readableTime); |
|
258 | } |
|
259 | } |
|
260 | ||
261 | public function testGetReadableMemory() |
|
262 | { |
|
@@ 261-275 (lines=15) @@ | ||
258 | } |
|
259 | } |
|
260 | ||
261 | public function testGetReadableMemory() |
|
262 | { |
|
263 | $memoryTest = array( |
|
264 | '314' => '314 b', |
|
265 | '7403' => '7.23 k', |
|
266 | '2589983' => '2.47 M' |
|
267 | ); |
|
268 | $display = new Display(); |
|
269 | $reflectedMethod = $this->getAccessibleMethod($display, 'getReadableMemory'); |
|
270 | ||
271 | foreach ($memoryTest as $rawMemory => $expectedMemory) { |
|
272 | $readableMemory = $reflectedMethod->invokeArgs($display, array($rawMemory)); |
|
273 | $this->assertEquals($expectedMemory, $readableMemory); |
|
274 | } |
|
275 | } |
|
276 | ||
277 | public function testGetFilePath() |
|
278 | { |