public function testSpecifyingLoggingThresholds() { $bridge = new ZendFrameworkTwoTimerBridge($this->log, array(1 => 'debug', 2 => 'warn', '3.5' => 'alert')); $this->log->expects($this->at(0))->method('debug')->with('fXmlRpc call took 0.1000000000s', array('xmlrpcMethod' => 'method', 'xmlrpcArguments' => array('arg1', 'arg2'))); $this->log->expects($this->at(1))->method('debug')->with('fXmlRpc call took 1.1000000000s', array('xmlrpcMethod' => 'method', 'xmlrpcArguments' => array('arg1', 'arg2'))); $this->log->expects($this->at(2))->method('warn')->with('fXmlRpc call took 2.5000000000s', array('xmlrpcMethod' => 'method', 'xmlrpcArguments' => array('arg1', 'arg2'))); $this->log->expects($this->at(3))->method('alert')->with('fXmlRpc call took 3.5000000000s', array('xmlrpcMethod' => 'method', 'xmlrpcArguments' => array('arg1', 'arg2'))); $this->log->expects($this->at(4))->method('alert')->with('fXmlRpc call took 5.5000000000s', array('xmlrpcMethod' => 'method', 'xmlrpcArguments' => array('arg1', 'arg2'))); $bridge->recordTiming(0.1, 'method', array('arg1', 'arg2')); $bridge->recordTiming(1.1, 'method', array('arg1', 'arg2')); $bridge->recordTiming(2.5, 'method', array('arg1', 'arg2')); $bridge->recordTiming(3.5, 'method', array('arg1', 'arg2')); $bridge->recordTiming(5.5, 'method', array('arg1', 'arg2')); }