diff --git a/Tests/Caster/ExceptionCasterTest.php b/Tests/Caster/ExceptionCasterTest.php index 7de30f4f..73545701 100644 --- a/Tests/Caster/ExceptionCasterTest.php +++ b/Tests/Caster/ExceptionCasterTest.php @@ -251,8 +251,8 @@ public function testExcludeVerbosity() public function testAnonymous() { - $e = new \Exception(sprintf('Boo "%s" ba.', \get_class(new class('Foo') extends \Exception { - }))); + $e = new \Exception(sprintf('Boo "%s" ba.', (new class('Foo') extends \Exception { + })::class)); $expectedDump = <<<'EODUMP' Exception { diff --git a/Tests/Caster/StubCasterTest.php b/Tests/Caster/StubCasterTest.php index cd6876cd..6ca2dad3 100644 --- a/Tests/Caster/StubCasterTest.php +++ b/Tests/Caster/StubCasterTest.php @@ -192,8 +192,8 @@ public function testClassStubWithNotExistingMethod() public function testClassStubWithAnonymousClass() { - $var = [new ClassStub(\get_class(new class() extends \Exception { - }))]; + $var = [new ClassStub((new class() extends \Exception { + })::class)]; $cloner = new VarCloner(); $dumper = new HtmlDumper();