1
0
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:
Fabien Villepinte
2021-07-14 12:57:59 +02:00
committed by GitHub
parent 42384f29ba
commit 63e195046c
2 changed files with 28 additions and 1 deletions

View File

@@ -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