AsMonologProcessorTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Attribute;
  11. use PHPUnit\Framework\TestCase;
  12. /**
  13. * @requires PHP 8.0
  14. */
  15. final class AsMonologProcessorTest extends TestCase
  16. {
  17. public function test(): void
  18. {
  19. $asMonologProcessor = new AsMonologProcessor('channel', 'handler', 'method', -10);
  20. $this->assertSame('channel', $asMonologProcessor->channel);
  21. $this->assertSame('handler', $asMonologProcessor->handler);
  22. $this->assertSame('method', $asMonologProcessor->method);
  23. $this->assertSame(-10, $asMonologProcessor->priority);
  24. $asMonologProcessor = new AsMonologProcessor(null, null, null, null);
  25. $this->assertNull($asMonologProcessor->channel);
  26. $this->assertNull($asMonologProcessor->handler);
  27. $this->assertNull($asMonologProcessor->method);
  28. $this->assertNull($asMonologProcessor->priority);
  29. }
  30. }