blob: 94a166cbbd002de82927a8c0ada41c4147e8bfdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
use Asko\Loggr\Drivers\OutputDriver;
use Asko\Loggr\Loggr;
use PHPUnit\Framework\TestCase;
class LoggrTest extends TestCase
{
/**
* @throws \Exception
*/
public function testNoDriver(): void
{
$this->expectExceptionMessage('No driver has been set.');
$loggr = new Loggr();
$loggr->info('test');
}
/**
* @throws \Exception
*/
public function testNoFormat(): void
{
$this->expectExceptionMessage('No format has been set.');
$loggr = new Loggr(new OutputDriver());
$loggr->format = null;
$loggr->info('test');
}
}
|