#51594 closed defect (bug) (fixed)
WP_PLUGIN_DIR constant unintentionally breaks plugin tests
| Reported by: | pierlo | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | high | Milestone: | 5.6 |
| Component: | Build/Test Tools | Version: | 5.6 |
| Severity: | major | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
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.
6 years ago
#1
- Keywords has-patch has-unit-tests added
dream-encode commented on PR #642:
6 years ago
#4
Merged into WP Core in https://core.trac.wordpress.org/changeset/49269
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/51594