\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

getLogs()

getLogs() : string[]

This must return the log messages in order with a simple formatting: "<LOG LEVEL> <MESSAGE>"

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

Returns

string[]

testImplements()

testImplements()

testLogsAtAllLevels()

testLogsAtAllLevels( $level,  $message)

Parameters

$level
$message

provideLevelsAndMessages()

provideLevelsAndMessages()

testThrowsOnInvalidLevel()

testThrowsOnInvalidLevel()

testContextReplacement()

testContextReplacement()

testObjectCastToString()

testObjectCastToString()

testContextCanContainAnything()

testContextCanContainAnything()

testContextExceptionKeyCanBeExceptionOrOtherValues()

testContextExceptionKeyCanBeExceptionOrOtherValues()