diff options
| author | Asko Nõmm <asko@nth.ee> | 2024-11-10 22:49:52 +0200 |
|---|---|---|
| committer | Asko Nõmm <asko@nth.ee> | 2024-11-10 22:49:52 +0200 |
| commit | 246e5a24a5ceedf364e06bb13e0a26cf46ee9507 (patch) | |
| tree | c8ee52d337a040a5c3ce83ec5b1e72fca984cf6e /tests/Drivers/OutputDriverTest.php | |
| parent | 882741f201426fa1ae39b461b7ba5bd8db6a77dc (diff) | |
Add phpunit.xml
Diffstat (limited to 'tests/Drivers/OutputDriverTest.php')
| -rw-r--r-- | tests/Drivers/OutputDriverTest.php | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/tests/Drivers/OutputDriverTest.php b/tests/Drivers/OutputDriverTest.php deleted file mode 100644 index 9f023ae..0000000 --- a/tests/Drivers/OutputDriverTest.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -namespace Asko\Loggr\Tests\Drivers; - -use Asko\Loggr\Drivers\OutputDriver; -use Asko\Loggr\Loggr; -use DateTime; -use PHPUnit\Framework\TestCase; - -class OutputDriverTest extends TestCase -{ - /** - * @throws \Exception - */ - public function testEmergency(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.EMERGENCY: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->emergency('test'); - } - - /** - * @throws \Exception - */ - public function testAlert(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.ALERT: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->alert('test'); - } - - /** - * @throws \Exception - */ - public function testCritical(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.CRITICAL: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->critical('test'); - } - - /** - * @throws \Exception - */ - public function testError(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.ERROR: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->error('test'); - } - - /** - * @throws \Exception - */ - public function testWarning(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.WARNING: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->warning('test'); - } - - /** - * @throws \Exception - */ - public function testNotice(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.NOTICE: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->notice('test'); - } - - /** - * @throws \Exception - */ - public function testInfo(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.INFO: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->info('test'); - } - - /** - * @throws \Exception - */ - public function testDebug(): void - { - $date = (new DateTime)->format('Y-m-d H:i:s'); - $this->expectOutputString("[{$date}] OutputDriverTest.DEBUG: test"); - $loggr = new Loggr(new OutputDriver()); - $loggr->debug('test'); - } -}
\ No newline at end of file |
