From d7fd848d18510522417ada55f76b56359baaee24 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Thu, 22 Oct 2026 17:32:35 -0600 Subject: [PATCH] Make the Html::clean() test data providers static PHPUnit 11 rejects a non-static data provider with an error, so `unsafeAttributeProvider()` and `safeMarkupProvider()` from #264 break CI on wip/1.3 (#207) as soon as develop is merged in. The other seven providers in the suite were already made static there. Static providers work unchanged under PHPUnit 9, so the full suite stays green on develop as well. --- tests/Html/HtmlBuilderTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Html/HtmlBuilderTest.php b/tests/Html/HtmlBuilderTest.php index 5ea4b572..e334d22a 100644 --- a/tests/Html/HtmlBuilderTest.php +++ b/tests/Html/HtmlBuilderTest.php @@ -81,7 +81,7 @@ public function testClean() $this->assertEquals('Test', $result); } - public function unsafeAttributeProvider() + public static function unsafeAttributeProvider() { return [ 'unquoted value' => ['', 'onerror'], @@ -124,7 +124,7 @@ public function testCleanRemovesUnsafeAttributes($html, $attribute) $this->assertStringNotContainsStringIgnoringCase($attribute, $result); } - public function safeMarkupProvider() + public static function safeMarkupProvider() { return [ 'heading' => ["# Hello\n"],