diff options
Diffstat (limited to 'tests/LoggrTest.php')
| -rw-r--r-- | tests/LoggrTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/LoggrTest.php b/tests/LoggrTest.php new file mode 100644 index 0000000..4abae86 --- /dev/null +++ b/tests/LoggrTest.php @@ -0,0 +1,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'); + } +}
\ No newline at end of file |
