Changes between Version 1 and Version 2 of Ticket #53010
- Timestamp:
- 04/09/2021 03:59:17 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #53010 – Description
v1 v2 20 20 21 21 To solve that, I would like to propose the following pattern: 22 * File paths: `tests/phpunit/tests/wp-[includes|admin]/ Class_Under_Test/FunctionUnderTest[OptionalSubsetIndicator]Test.php`23 * Namespace: `WordPress\Tests\WP_[Includes|Admin]\ Class_Under_Test`22 * File paths: `tests/phpunit/tests/wp-[includes|admin]/[SubFolder/]*Class_Under_Test/FunctionUnderTest[OptionalSubsetIndicator]Test.php` 23 * Namespace: `WordPress\Tests\WP_[Includes|Admin]\[SubFolder\]*Class_Under_Test` 24 24 * Classname: `FunctionUnderTest[OptionalSubsetIndicator]Test` 25 26 For WP Core files which only contain functions outside of a class structure, the following pattern is proposed: 27 * File paths: `tests/phpunit/tests/wp-[includes|admin]/[SubFolder/]*Functions_FileName/FunctionUnderTest[OptionalSubsetIndicator]Test.php` 28 * Namespace: `WordPress\Tests\WP_[Includes|Admin]\[SubFolder\]*Functions_FileName` 29 * Classname: `FunctionUnderTest[OptionalSubsetIndicator]Test` 30 25 31 26 32 The pattern I'm proposing does imply a re-organisation of the test suite directory and file structure, but that IMO is for the better. … … 29 35 30 36 This will also allow for using PSR-4 autoloading for the tests classes and adding the `autoload-dev` directive to the `composer.json` file. 37 38 31 39 32 40 == Planning