| @@ 16-29 (lines=14) @@ | ||
| 13 | { |
|
| 14 | } |
|
| 15 | ||
| 16 | public function testLog() |
|
| 17 | { |
|
| 18 | $data = array( |
|
| 19 | 'key' => 'value' |
|
| 20 | ); |
|
| 21 | ||
| 22 | $console = new Console(); |
|
| 23 | $console->log($data); |
|
| 24 | $store = $this->getProtectedStore($console); |
|
| 25 | $log = array_pop($store); |
|
| 26 | ||
| 27 | $this->assertSame($data, $log['data']); |
|
| 28 | $this->assertEquals('log', $log['type']); |
|
| 29 | } |
|
| 30 | ||
| 31 | public function testLogMemory() |
|
| 32 | { |
|
| @@ 75-86 (lines=12) @@ | ||
| 72 | $this->assertEquals($message, $log['data']); |
|
| 73 | } |
|
| 74 | ||
| 75 | public function testLogSpeed() |
|
| 76 | { |
|
| 77 | $name = 'Test Speed'; |
|
| 78 | ||
| 79 | $console = new Console(); |
|
| 80 | $console->logSpeed($name); |
|
| 81 | $store = $this->getProtectedStore($console); |
|
| 82 | $log = array_pop($store); |
|
| 83 | ||
| 84 | $this->assertEquals($name, $log['name']); |
|
| 85 | $this->assertEquals('speed', $log['type']); |
|
| 86 | } |
|
| 87 | ||
| 88 | public function testGetLogs() |
|
| 89 | { |
|