Skip to:
Content

BuddyPress.org

Opened 7 months ago

Closed 6 months ago

#9053 closed task (fixed)

Update wp-env to version 9.0

Reported by: imath's profile imath Owned by: netweb's profile netweb
Milestone: 14.0.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Cc:

Description

This is a task I skipped on purpose in #9047 as wp-env's way of testing PHP has evolved. After digging more into it, I wasn't able to find the right use for wp-env run tests-cli phpunit as explained here.

But I was able to use the wp-env run cli --env-cwd=wp-content/plugins/buddypress composer command to run PHPUnit tests.

I'll submit a PR to run the GH actions to see if my way of testing PHP with wp-env is also fine for these.

Change History (4)

This ticket was mentioned in PR #211 on buddypress/buddypress by @imath.


7 months ago
#1

  • Keywords has-patch has-unit-tests added; needs-patch removed
  • Updates package.json @wordpress/env version and PHPUnit related scripts
  • Adds a script to ease multisite PHPunit testing in composer.json
  • Fixes some failing tests in wp-env due to the way the site domain is defined.

PS: some constant/config files may not be needed anymore (eg: BP_USE_WP_ENV_TESTS or env.xml).

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9053

@imath commented on PR #211:


7 months ago
#2

Unit Testing when WordPress version is < 6.1 still needs some work and seems to be the only case where we need the wp-phpunit/wp-phunit composer package and constant/config files like BP_USE_WP_ENV_TESTS or env.xml.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


6 months ago

#4 @imath
6 months ago

  • Resolution set to fixed
  • Status changed from new to closed

In 13720:

Update wp-env to version 9.0.0 & adapt the PHPUnit tests suite to it

  • Update PHPUnit related npm scripts for wp-env 9.0.0.
  • Create test_multi: a new composer script to run Multisite Unit tests.
  • Remove our composer dependency to wp-phpunit/wp-phpunit.
  • Update the PHPUnit tests suite so that it stops using wp-phpunit/wp-phpunit when it's within the wp-env context.
  • Remove no more used PHPUnit specific configuration files.

Fixes #9053
Closes https://github.com/buddypress/buddypress/pull/211

Note: See TracTickets for help on using tickets.