UidProcessorTest.php 784 B

123456789101112131415161718192021222324252627282930313233
  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\Processor;
  11. use Monolog\Test\TestCase;
  12. class UidProcessorTest extends TestCase
  13. {
  14. /**
  15. * @covers Monolog\Processor\UidProcessor::__invoke
  16. */
  17. public function testProcessor()
  18. {
  19. $processor = new UidProcessor();
  20. $record = $processor($this->getRecord());
  21. $this->assertArrayHasKey('uid', $record->extra);
  22. }
  23. public function testGetUid()
  24. {
  25. $processor = new UidProcessor(10);
  26. $this->assertEquals(10, \strlen($processor->getUid()));
  27. }
  28. }