Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ClassThatInheritLogger example
$logger
->
reset
(
)
;
$this
->
assertEmpty
(
$logger
->
getLogs
(
)
)
;
$this
->
assertSame
(
0,
$logger
->
countErrors
(
)
)
;
if
(
class_exists
(
ResettableInterface::
class
)
)
{
$this
->
assertEmpty
(
$handler
->
getRecords
(
)
)
;
}
}
public
function
testInheritedClassCallGetLogsWithoutArgument
(
)
{
$loggerChild
=
new
ClassThatInheritLogger
(
'test'
)
;
$this
->
assertSame
(
[
]
,
$loggerChild
->
getLogs
(
)
)
;
}
public
function
testInheritedClassCallCountErrorsWithoutArgument
(
)
{
$loggerChild
=
new
ClassThatInheritLogger
(
'test'
)
;
$this
->
assertEquals
(
0,
$loggerChild
->
countErrors
(
)
)
;
}
}