#51594 closed defect (bug) (fixed)
WP_PLUGIN_DIR constant unintentionally breaks plugin tests
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.6 | Priority: | high |
| Severity: | major | Version: | 5.6 |
| Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Description (last modified by )
A recent change was made to the PHPUnit bootstrap file that sets WP_PLUGIN_DIR to the path of the plugin test data directory (tests/phpunit/data/plugins). This modification will unintentionally break a lot of tests for non-core plugins that rely on WP_PLUGIN_DIR being set to the expected plugins directory in WP_CONTENT_DIR or already have the constant defined.
Since the WP_PLUGIN_DIR constant is only needed when Core tests are to be run, I'd like to propose that the constant will only be set when WP_RUN_CORE_TESTS has a truthy value.
Change History (4)
This ticket was mentioned in PR #642 on WordPress/wordpress-develop by pierlon.
5 years ago
#1
- Keywords has-patch has-unit-tests added
#3
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 49269:
dream-encode commented on PR #642:
5 years ago
#4
Merged into WP Core in https://core.trac.wordpress.org/changeset/49269
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/51594