\Psr\Log\TestLoggerInterfaceTest

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
No private properties found
N/A

Methods

getLogger()

getLogger() : \Psr\Log\LoggerInterface

Returns

\Psr\Log\LoggerInterface —

getLogs()

getLogs() : string[]

This must return the log messages in order.

The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>".

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

Returns

string[] —

testImplements()

testImplements() : mixed

Returns

mixed —

testLogsAtAllLevels()

testLogsAtAllLevels(mixed  $level, mixed  $message) : mixed

Parameters

mixed $level
mixed $message

Returns

mixed —

provideLevelsAndMessages()

provideLevelsAndMessages() : mixed

Returns

mixed —

testThrowsOnInvalidLevel()

testThrowsOnInvalidLevel() : mixed

Returns

mixed —

testContextReplacement()

testContextReplacement() : mixed

Returns

mixed —

testObjectCastToString()

testObjectCastToString() : mixed

Returns

mixed —

testContextCanContainAnything()

testContextCanContainAnything() : mixed

Returns

mixed —

testContextExceptionKeyCanBeExceptionOrOtherValues()

testContextExceptionKeyCanBeExceptionOrOtherValues() : mixed

Returns

mixed —