summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php
Commit message (Collapse)AuthorAge
* Coding Standards: Use pre-increment/decrement for stand-alone statements.SergeyBiryukov2023-09-09
| | | | | | | | | | | | | | | | Note: This is enforced by WPCS 3.0.0: 1. There should be no space between an increment/decrement operator and the variable it applies to. 2. Pre-increment/decrement should be favoured over post-increment/decrement for stand-alone statements. “Pre” will in/decrement and then return, “post” will return and then in/decrement. Using the “pre” version is slightly more performant and can prevent future bugs when code gets moved around. References: * [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#increment-decrement-operators WordPress PHP Coding Standards: Increment/decrement operators] * [https://github.com/WordPress/WordPress-Coding-Standards/pull/2130 WPCS: PR #2130 Core: add sniffs to check formatting of increment/decrement operators] Props jrf. See #59161, #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56549 602fd350-edb4-49c9-b593-d223f7449a82
* Code Modernization: Use explicit visibility for class property declarations.Sergey Biryukov2020-10-17
| | | | | | | | | | | Using `var` or only `static` to declare a class property is PHP 4 code. This updates the codebase to use explicit visibility modifiers introduced in PHP 5. Props jrf. Fixes #51557. See #22234. git-svn-id: https://develop.svn.wordpress.org/trunk@49184 602fd350-edb4-49c9-b593-d223f7449a82
* Build/Test Tools: Add missing access modifiers to factory classes in ↵Sergey Biryukov2019-03-15
| | | | | | | | | `phpunit/includes/factory`. Props andizer. Fixes #46504. git-svn-id: https://develop.svn.wordpress.org/trunk@44903 602fd350-edb4-49c9-b593-d223f7449a82
* Code is Poetry.Gary Pendergast2017-11-30
| | | | | | | | | | | | WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
* Tests: Use the same incrementor for all fields belonging to a given text ↵Boone Gorges2016-04-22
| | | | | | | | | | | | | | | | | | fixture. [35244] changed the way that `WP_UnitTest_Generator_Sequence()` created an incrementor for object fields (like 'post_name' and 'user_email'), by making incrementor static across the entire run of the test suite. While this helped to enforce uniqueness across the tests, it has the side effect of bumping the incrementor between fields on the same object (so that, eg, the same post might have `post_name` "post-12" but `post_title` "Post 13". By switching to a technique that uses the same incrementor for each field belonging to a given fixture, we conform better to the expectations of developers using `WP_UnitTest_Factory`. Fixes #35199. git-svn-id: https://develop.svn.wordpress.org/trunk@37299 602fd350-edb4-49c9-b593-d223f7449a82
* Build/Test Tools: Move PHP factory classes into their own files.Eric Andrew Lewis2016-01-19
This makes the code easier to browse. `factory.php` loads the new files, so this is backwards compatible in case `factory.php` is loaded directly for access to one of the classes. See #35492. git-svn-id: https://develop.svn.wordpress.org/trunk@36347 602fd350-edb4-49c9-b593-d223f7449a82