Adding Logger Tests
This commit is contained in:
committed by
Hypolite Petovan
parent
7bebb03f95
commit
aee348fa02
52
tests/src/Util/Logger/LoggerDataTrait.php
Normal file
52
tests/src/Util/Logger/LoggerDataTrait.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Util\Logger;
|
||||
|
||||
trait LoggerDataTrait
|
||||
{
|
||||
public function dataTests()
|
||||
{
|
||||
return [
|
||||
'emergency' => [
|
||||
'function' => 'emergency',
|
||||
'message' => 'test',
|
||||
'context' => ['a' => 'context'],
|
||||
],
|
||||
'alert' => [
|
||||
'function' => 'alert',
|
||||
'message' => 'test {test}',
|
||||
'context' => ['a' => 'context', 2 => 'so', 'test' => 'works'],
|
||||
],
|
||||
'critical' => [
|
||||
'function' => 'critical',
|
||||
'message' => 'test crit 2345',
|
||||
'context' => ['a' => 'context', 'wit' => ['more', 'array']],
|
||||
],
|
||||
'error' => [
|
||||
'function' => 'error',
|
||||
'message' => 2.554,
|
||||
'context' => [],
|
||||
],
|
||||
'warning' => [
|
||||
'function' => 'warning',
|
||||
'message' => 'test warn',
|
||||
'context' => ['a' => 'context'],
|
||||
],
|
||||
'notice' => [
|
||||
'function' => 'notice',
|
||||
'message' => 2346,
|
||||
'context' => ['a' => 'context'],
|
||||
],
|
||||
'info' => [
|
||||
'function' => 'info',
|
||||
'message' => null,
|
||||
'context' => ['a' => 'context'],
|
||||
],
|
||||
'debug' => [
|
||||
'function' => 'debug',
|
||||
'message' => true,
|
||||
'context' => ['a' => false],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user