Opened 5 years ago
Closed 5 years ago
#49663 closed defect (bug) (fixed)
Fix PHPUnit bootstrap to install from the same directory where the tests will be run
Reported by: | azaozz | Owned by: | azaozz |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (2)
Change History (8)
#3
@
5 years ago
- Keywords has-patch needs-testing added
In 49663.diff: pass the WP_RUN_CORE_TESTS
constant when running /tests/phpunit/includes/install.php
from cli.
#4
@
5 years ago
In 49663.1.diff: same as 49663.diff but instead of passing vars through cli uses putenv()
and getenv()
. These were pretty much meant for cases like this.
Note: See
TracTickets for help on using
tickets.
Happens because
WP_RUN_CORE_TESTS
is not defined when PHP is run from the cli: https://core.trac.wordpress.org/browser/tags/5.3.2/tests/phpunit/includes/bootstrap.php#L100.Seems a simple fix would be to pass another param to
system( php ... )
similarly to$config_file_path
and$multisite
.