Skip to content

Commit

Permalink
Leverage class name literal on object
Browse files Browse the repository at this point in the history
  • Loading branch information
tigitz committed Nov 30, 2022
1 parent 6228b11 commit 29da1bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tests/Caster/ExceptionCasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Caster/StubCasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 29da1bc

Please sign in to comment.