mirror of
https://github.com/Seldaek/monolog.git
synced 2025-07-30 18:00:17 +02:00
Fix Utils::getClass() with PHP8 (#1563)
This commit is contained in:
committed by
GitHub
parent
42384f29ba
commit
63e195046c
@@ -13,6 +13,25 @@ namespace Monolog;
|
||||
|
||||
class UtilsTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @param string $expected
|
||||
* @param object $object
|
||||
* @dataProvider provideObjects
|
||||
*/
|
||||
public function testGetClass($expected, $object)
|
||||
{
|
||||
$this->assertSame($expected, Utils::getClass($object));
|
||||
}
|
||||
|
||||
public function provideObjects()
|
||||
{
|
||||
return [
|
||||
['stdClass', new \stdClass()],
|
||||
['class@anonymous', new class {}],
|
||||
['stdClass@anonymous', new class extends \stdClass {}],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $expected
|
||||
* @param string $input
|
||||
|
Reference in New Issue
Block a user