public function testLog()
 {
     $end = $this->end;
     $this->mockFunction('microtime', function () use($end) {
         return $end;
     });
     /** @var \PHPUnit_Framework_MockObject_MockObject|Logger $mock */
     $mock = $this->getMockBuilder(Logger::class)->setConstructorArgs(['logger'])->setMethods(['log'])->getMock();
     $mock->expects($this->once())->method('log')->with($this->equalTo(Logger::ALL), $this->equalTo("hello {$this->start} {$this->end} {$this->time}"));
     $timer = new LoggerTimer($mock, $this->start);
     $timer->log(Logger::ALL, 'hello {start} {end} {time}');
 }
 public function testLog()
 {
     $end = $this->end;
     $this->mockFunction('microtime', function () use($end) {
         return $end;
     });
     $mock = $this->getMockBuilder('Logger')->setConstructorArgs(array('logger'))->setMethods(array('log'))->getMock();
     $mock->expects($this->once())->method('log')->with($this->equalTo(Logger::ALL), $this->equalTo("hello {$this->start} {$this->end} {$this->time}"));
     $timer = new LoggerTimer($mock, $this->start);
     $timer->log(Logger::ALL, "hello {start} {end} {time}");
 }