mirror of
https://github.com/friendica/friendica
synced 2025-05-01 08:24:23 +02:00
Tests
This commit is contained in:
parent
72bc1238ba
commit
9ce43ad21d
7 changed files with 16 additions and 0 deletions
|
@ -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']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue