Skip to content

Commit

Permalink
add logger context tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moolex committed Jul 29, 2019
1 parent e131e82 commit 54ae919
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,25 @@

class LoggerTest extends TestCase
{
private const DAT = [
'k1' => 'v1',
'k2' => 111,
'k3' => true,
'k4' => null,
'k5' => [1, 2, 3],
'k6' => ['kk1' => 'vv1']
];

public function testFunc()
{
conf()->set('log.addr', '???');
logger('test')->info('test1');
logger('test')->info('test1', self::DAT);

conf()->set('test.log.format', 'json');
logger('test')->info('test2');
logger('test')->info('test2', self::DAT);

conf()->set('log.level', 'debug');
logger()->debug('test3');
logger()->debug('test3', self::DAT);

$this->assertTrue(logger() instanceof Logger);
}
Expand Down

0 comments on commit 54ae919

Please sign in to comment.