TYPO3  7.6
Public Member Functions | List of all members
LoggerInterfaceTest Class Reference
Inheritance diagram for LoggerInterfaceTest:
ConsoleLoggerTest

Public Member Functions

 getLogger ()
 
 getLogs ()
 
 testImplements ()
 
 testLogsAtAllLevels ($level, $message)
 
 provideLevelsAndMessages ()
 
 testThrowsOnInvalidLevel ()
 
 testContextReplacement ()
 
 testObjectCastToString ()
 
 testContextCanContainAnything ()
 
 testContextExceptionKeyCanBeExceptionOrOtherValues ()
 

Detailed Description

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.

Definition at line 14 of file LoggerInterfaceTest.php.

Member Function Documentation

getLogger ( )
abstract
getLogs ( )
abstract

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[]
provideLevelsAndMessages ( )
testContextCanContainAnything ( )

Definition at line 98 of file LoggerInterfaceTest.php.

testContextExceptionKeyCanBeExceptionOrOtherValues ( )

Definition at line 117 of file LoggerInterfaceTest.php.

testContextReplacement ( )

Definition at line 76 of file LoggerInterfaceTest.php.

testImplements ( )

Definition at line 32 of file LoggerInterfaceTest.php.

References LoggerInterfaceTest\getLogger().

testLogsAtAllLevels (   $level,
  $message 
)

provideLevelsAndMessages

Definition at line 40 of file LoggerInterfaceTest.php.

References LoggerInterfaceTest\getLogger().

testObjectCastToString ( )

Definition at line 85 of file LoggerInterfaceTest.php.

testThrowsOnInvalidLevel ( )

Definition at line 70 of file LoggerInterfaceTest.php.