CodeExplorer DoctrineSQLHandler example
private Connection&MockObject
$connection;
protected function setUp(): void
{ $this->connection =
$this->
createMock(Connection::
class);
} public function testWrite(): void
{ $this->connection->
expects(static::
once())->
method('insert'
);
$handler =
new DoctrineSQLHandler($this->connection
);
$record =
new LogRecord( new \
DateTimeImmutable(),
'business events',
Level::Error,
'Some message'
);
$handler->
handle($record);
}