Exemple #1
0
 /** {@inheritdoc} */
 public function call($methodName, array $arguments = [])
 {
     $startTime = microtime(true);
     $result = parent::call($methodName, $arguments);
     $this->timer->recordTiming(microtime(true) - $startTime, $methodName, $arguments);
     return $result;
 }
 public function testRecordTimeIsCalled()
 {
     $this->timer->expects($this->once())->method('recordTiming')->with($this->equalTo(0, 0.1), 'method', array('arg1', 'arg2'));
     $this->wrapped->expects($this->once())->method('call')->with('method', array('arg1', 'arg2'));
     $this->decorator->call('method', array('arg1', 'arg2'));
 }