Coding Standards: Update the config for WordPress.PHP.FileName in PHPCS ruleset.

The WPCS sniff already takes the test classes in the `tests/phpunit/includes` directory into account.

Only the test cases outside of that directory, i.e. in the `tests/phpunit/tests` directory need to be listed here.

Includes alphabetizing the list.

Follow-up to [42346], [45607].

Props jrf, hellofromTonya, SergeyBiryukov.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Tonya Mork 2021-08-26 13:35:16 +00:00
parent 4e682f0910
commit e5e2b86a6a

View File

@ -231,23 +231,18 @@
<rule ref="WordPress.Files.FileName">
<properties>
<property name="custom_test_class_whitelist" type="array">
<!-- Test case parent classes. -->
<!-- Test case parent classes in the "includes" folder, not yet accounted for in WPCS. -->
<element value="PHPUnit_Adapter_TestCase"/>
<element value="WP_UnitTestCase"/>
<element value="WP_Ajax_UnitTestCase"/>
<element value="WP_Canonical_UnitTestCase"/>
<element value="WP_Test_REST_TestCase"/>
<element value="WP_Test_REST_Controller_Testcase"/>
<element value="WP_Test_REST_Post_Type_Controller_Testcase"/>
<element value="WP_XMLRPC_UnitTestCase"/>
<element value="WP_Filesystem_UnitTestCase"/>
<element value="WP_Image_UnitTestCase"/>
<element value="WP_HTTP_UnitTestCase"/>
<element value="WP_Tests_Image_Resize_UnitTestCase"/>
<element value="WP_Import_UnitTestCase"/>
<element value="Tests_Query_Conditionals"/>
<element value="WP_Test_XML_TestCase"/>
<!-- Test case parent classes outside of the "includes" folder. -->
<element value="Tests_Query_Conditionals"/>
<element value="WP_Filesystem_UnitTestCase"/>
<element value="WP_HTTP_UnitTestCase"/>
<element value="WP_Image_UnitTestCase"/>
<element value="WP_Import_UnitTestCase"/>
<element value="WP_Test_Adjacent_Image_Link_TestCase"/>
<element value="WP_Tests_Image_Resize_UnitTestCase"/>
<!-- Mock classes. -->
<element value="Spy_REST_Server"/>