Opened 8 years ago
Closed 8 years ago
#44521 closed enhancement (fixed)
Add documentation to the PHPUnit factory objects
| Reported by: | andizer | Owned by: | pento |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
I discovered that the php unit test factories for WordPress aren't documented well. To make it easier for every one I decided to add some documentation for it.
Another thing I was wondering about is the old php4 way to declare methods (without access modifiers) and var declarations on class attributes. Is it desirable to modernize these or should I keep this untouched. Probably it is worth to make a separate issue for it.
Attachments (2)
Change History (8)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@andizer
One thing I noticed when doing a quick skim of your patch: The docblock for
WP_UnitTest_Factory_Callback_After_Create::__construct()hasstringas the parameter type. This should actually becallable. While this type hint is only valid in PHP 5.4+, using it in the docblock won't have any issue.