This commit is contained in:
Michael 2021-07-27 06:22:37 +00:00
parent 72bc1238ba
commit 9ce43ad21d
7 changed files with 16 additions and 0 deletions

View file

@ -59,6 +59,8 @@ class ProfilerLoggerTest extends MockedTest
$logger = new ProfilerLogger($this->logger, $this->profiler);
$this->logger->shouldReceive($function)->with($message, $context)->once();
$this->profiler->shouldReceive('startRecording');
$this->profiler->shouldReceive('stopRecording');
$this->profiler->shouldReceive('saveTimestamp')->with(\Mockery::any(), 'file')->once();
$logger->$function($message, $context);
}
@ -72,6 +74,8 @@ class ProfilerLoggerTest extends MockedTest
$logger = new ProfilerLogger($this->logger, $this->profiler);
$this->logger->shouldReceive('log')->with(LogLevel::WARNING, 'test', ['a' => 'context'])->once();
$this->profiler->shouldReceive('startRecording');
$this->profiler->shouldReceive('stopRecording');
$this->profiler->shouldReceive('saveTimestamp')->with(\Mockery::any(), 'file')->once();
$logger->log(LogLevel::WARNING, 'test', ['a' => 'context']);