Skip to content

Commit dc65bb3

Browse files
committed
Improve test types
Improve some test types from [61754]
1 parent 92a127b commit dc65bb3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/phpunit/tests/html-api/wpHtmlProcessorModifiableText.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Tests_HtmlApi_WpHtmlProcessorModifiableText extends WP_UnitTestCase {
2424
* @param string $set_text Text to set.
2525
* @param string $expected_html Expected HTML output.
2626
*/
27-
public function test_modifiable_text_special_textarea( string $set_text, string $expected_html ) {
27+
public function test_modifiable_text_special_textarea( string $set_text, string $expected_html ): void {
2828
$processor = WP_HTML_Processor::create_fragment( '<textarea></textarea>' );
2929
$processor->next_token();
3030
$processor->set_modifiable_text( $set_text );
@@ -50,9 +50,9 @@ public function test_modifiable_text_special_textarea( string $set_text, string
5050
/**
5151
* Data provider.
5252
*
53-
* @return array[]
53+
* @return array<string, array{0: string, 1: string}>
5454
*/
55-
public static function data_modifiable_text_special_textarea() {
55+
public static function data_modifiable_text_special_textarea(): array {
5656
return array(
5757
'Leading newline' => array(
5858
"\nAFTER NEWLINE",

tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public function test_json_auto_escaping() {
644644
*
645645
* @ticket 64609
646646
*/
647-
public function test_modifiable_text_special_textarea() {
647+
public function test_modifiable_text_special_textarea(): void {
648648
$processor = new WP_HTML_Tag_Processor( '<textarea></textarea>' );
649649
$processor->next_token();
650650
$processor->set_modifiable_text( "\nAFTER NEWLINE" );

0 commit comments

Comments
 (0)