['code'], 'html' => ['code', 'html'], 'text' => ['code', 'html', 'text'], 'url' => ['url'], ]; foreach (ValueKind::cases() as $override) { foreach (ValueKind::cases() as $routed) { self::assertSame( in_array($routed->value, $allowed[$override->value], true), $override->tightens($routed), $override->value . ' over ' . $routed->value ); } } } public function testValuesAreTheCuratedKindNames(): void { self::assertSame(['html', 'code', 'url', 'text'], array_map(static fn (ValueKind $kind): string => $kind->value, ValueKind::cases())); self::assertNull(ValueKind::tryFrom('richtext')); } }