abstract class LoggerInterfaceTest extends PHPUnit_Framework_TestCase (View source)

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.

Methods

getLogger()

No description

string[]
getLogs()

This must return the log messages in order.

testImplements()

No description

testLogsAtAllLevels($level, $message)

No description

provideLevelsAndMessages()

No description

testThrowsOnInvalidLevel()

No description

testContextReplacement()

No description

testObjectCastToString()

No description

Details

abstract LoggerInterface getLogger()

Return Value

LoggerInterface

abstract string[] getLogs()

This must return the log messages in order.

The simple formatting of the messages is: " ".

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

Return Value

string[]

testImplements()

testLogsAtAllLevels($level, $message)

Parameters

$level
$message

provideLevelsAndMessages()

testThrowsOnInvalidLevel()

testContextReplacement()

testObjectCastToString()

testContextCanContainAnything()

testContextExceptionKeyCanBeExceptionOrOtherValues()