1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 15:44:34 +02:00

Add AsMonologProcessor attribute (#1637)

This commit is contained in:
Thomas Calvet
2022-03-06 13:08:33 +01:00
committed by GitHub
parent 4b34c2893f
commit 8c58abad9e
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog\Attribute;
use PHPUnit\Framework\TestCase;
/**
* @requires PHP 8.0
*/
final class AsMonologProcessorTest extends TestCase
{
public function test(): void
{
$asMonologProcessor = new AsMonologProcessor('channel', 'handler', 'method');
$this->assertSame('channel', $asMonologProcessor->channel);
$this->assertSame('handler', $asMonologProcessor->handler);
$this->assertSame('method', $asMonologProcessor->method);
$asMonologProcessor = new AsMonologProcessor(null, null, null);
$this->assertNull($asMonologProcessor->channel);
$this->assertNull($asMonologProcessor->handler);
$this->assertNull($asMonologProcessor->method);
}
}