blob: 4abae8667034e3cafebfb24bd6750789caebea17 (
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
30
31
|
<?php
namespace Asko\Loggr\Tests;
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');
}
}
|