/** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data = array('commands' => null !== $this->logger ? $this->logger->getCommands() : array()); }
public function testCommandsWithoutLogger() { $redisLogger = new RedisLogger(); for ($i = 0; $i < 3; $i++) { $redisLogger->logCommand('foo' . $i, ($i + 1) * 10, 'connection', $i % 2 ? 'error message' : false); } $this->assertEquals(array(), $redisLogger->getCommands()); }