fXmlRpc\Timing\TimingDecorator::call PHP Method

call() public method

public call ( $methodName, array $arguments = [] )
$arguments array
    public function call($methodName, array $arguments = [])
    {
        $startTime = microtime(true);
        $result = parent::call($methodName, $arguments);
        $this->timer->recordTiming(microtime(true) - $startTime, $methodName, $arguments);
        return $result;
    }

Usage Example

Example #1
0
 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'));
 }
TimingDecorator