diff options
| author | Asko Nõmm <asko@nth.ee> | 2024-11-11 17:55:31 +0200 |
|---|---|---|
| committer | Asko Nõmm <asko@nth.ee> | 2024-11-11 17:55:31 +0200 |
| commit | 1da334065354208f969026fb6be15c0f4294ddb8 (patch) | |
| tree | 5327fcb6cb1c5d7ccc1bfead53d6073894a17b42 /tests/LoggrTest.php | |
| parent | 6e01b0239518a10539c431574c3ec3b29d0be35c (diff) | |
Test Format enum methods and do not throw Loggr when driver of format is not set, instead silently fail into `$this->error`.
Diffstat (limited to 'tests/LoggrTest.php')
| -rw-r--r-- | tests/LoggrTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/LoggrTest.php b/tests/LoggrTest.php index 4abae86..eb2f5ab 100644 --- a/tests/LoggrTest.php +++ b/tests/LoggrTest.php @@ -13,9 +13,9 @@ class LoggrTest extends TestCase */ public function testNoDriver(): void { - $this->expectExceptionMessage('No driver has been set.'); $loggr = new Loggr(); $loggr->info('test'); + $this->assertEquals("Driver or format not set.", $loggr->error); } /** @@ -23,9 +23,9 @@ class LoggrTest extends TestCase */ public function testNoFormat(): void { - $this->expectExceptionMessage('No format has been set.'); $loggr = new Loggr(new OutputDriver()); $loggr->format = null; $loggr->info('test'); + $this->assertEquals("Driver or format not set.", $loggr->error); } }
\ No newline at end of file |
