[wp-trac] [WordPress Trac] #51594: WP_PLUGIN_DIR constant unintentionally breaks plugin tests

WordPress Trac noreply at wordpress.org
Wed Oct 21 22:18:26 UTC 2020


#51594: WP_PLUGIN_DIR constant unintentionally breaks plugin tests
------------------------------+--------------------
 Reporter:  pierlo            |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  high              |  Milestone:  5.6
Component:  Build/Test Tools  |    Version:  trunk
 Severity:  major             |   Keywords:
  Focuses:                    |
------------------------------+--------------------
 A [https://github.com/WordPress/wordpress-
 develop/pull/613/commits/5857216e7424053a6e588e7d2323874eab1f8529 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 modeification 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51594>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list