$genericA = new FakeType(), 'TemplateB' => $genericB = new FakeType(), ]; $signature = new ClassSignature($className, $generics); self::assertSame($className, $signature->className()); self::assertSame("$className<$genericA, $genericB>", $signature->toString()); self::assertSame($generics, $signature->generics()); } public function test_left_backslash_is_trimmed_from_class_name(): void { $signature = new ClassSignature('\\' . stdClass::class); self::assertSame(stdClass::class, $signature->className()); } }