From f2ff3a27bd0f5142d909fb2129382b243f99d517 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Mon, 29 Jan 2024 16:53:39 +0545 Subject: [PATCH] Add explanation in readme parser warnings tests --- .../tests/Checker/Checks/Plugin_Readme_Check_Tests.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php b/tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php index 6bfaf468f..45c807791 100644 --- a/tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php +++ b/tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php @@ -327,6 +327,11 @@ public function test_run_with_errors_multiple_parser_warnings_and_empty_ignored_ $this->assertNotEmpty( $warnings ); $this->assertArrayHasKey( 'readme.txt', $warnings ); + + /* + * Parser warning `contributor_ignored` is ignored by default. When empty array is returned for + * 'wp_plugin_check_ignored_readme_warnings' then that ignored warning is also added in the list of warnings. + */ $this->assertEquals( 7, $check_result->get_warning_count() ); $this->assertEmpty( $errors ); $this->assertEquals( 0, $check_result->get_error_count() );