fix: Task 5 review round 1 - restore point inside the kses window, strict map field types (S37)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 15:08:48 +02:00
co-authored by Claude Opus 5.5
parent 7762b76305
commit b8cb01812e
12 changed files with 200 additions and 26 deletions
@@ -46,4 +46,14 @@ final class WpValueSanitizerTest extends TestCase
self::assertSame('Hallo', $sanitizer->text('<b>Hallo</b>'));
self::assertSame('url(https://x.test/a b)', $sanitizer->url(' https://x.test/a b '));
}
public function testCanReadPostAsksWordPress(): void
{
Functions\when('current_user_can')->alias(static fn (string $cap, int $id = 0): bool => $cap === 'read_post' && $id === 12);
$sanitizer = new WpValueSanitizer();
self::assertTrue($sanitizer->canReadPost(12));
self::assertFalse($sanitizer->canReadPost(13));
}
}