customFieldClass); } public function testHasAttributeAttributeOnLoggable(): void { $reflection = new \ReflectionClass(Loggable::class); /** @var array<\ReflectionAttribute<\Attribute>> $attributes */ $attributes = array_filter($reflection->getAttributes(), fn ($attr) => $attr->getName() === \Attribute::class); self::assertCount(1, $attributes, 'Loggable class should have the Attribute attribute'); $attribute = $attributes[0]; self::assertEquals(\Attribute::TARGET_CLASS, $attribute->getArguments()[0]); } }