UidProcessorTest.php 777 B

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