\MonologPsrLogCompatTest

Provides a base test class for ensuring compliance with the LoggerInterface.

Implementors can extend the class and implement abstract methods to run this as part of their test suite.

Summary

Methods
Properties
Constants
getLogger()
getLogs()
testImplements()
testLogsAtAllLevels()
provideLevelsAndMessages()
testThrowsOnInvalidLevel()
testContextReplacement()
testObjectCastToString()
testContextCanContainAnything()
testContextExceptionKeyCanBeExceptionOrOtherValues()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$handler
N/A

Properties

$handler

$handler : 

Type

Methods

getLogs()

getLogs() : array<mixed,string>

This must return the log messages in order.

The simple formatting of the messages is: " ".

Example ->error('Foo') would yield "error Foo".

Returns

array<mixed,string>

testImplements()

testImplements() 

testLogsAtAllLevels()

testLogsAtAllLevels(  $level,   $message) 

Parameters

$level
$message

provideLevelsAndMessages()

provideLevelsAndMessages() 

testThrowsOnInvalidLevel()

testThrowsOnInvalidLevel() 

testContextReplacement()

testContextReplacement() 

testObjectCastToString()

testObjectCastToString() 

testContextCanContainAnything()

testContextCanContainAnything() 

testContextExceptionKeyCanBeExceptionOrOtherValues()

testContextExceptionKeyCanBeExceptionOrOtherValues()