Make WordPress Core

Opened 5 hours ago

Closed 4 hours ago

Last modified 4 hours ago

#62106 closed defect (bug) (fixed)

Plugin phpunit integration testing (following documented instructions) is broken

Reported by: bjorsch's profile bjorsch Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: normal
Severity: normal Version: trunk
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

[59085] has broken plugin PHPUnit tests that are set up following the instructions at https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/

Attempting to create a new plugin and run its tests following the instructions on that page now produces the following error message upon running phpunit:

The test suite requires the WordPress Importer plugin to be available in the /data/plugins/ directory. See: https://make.wordpress.org/core/handbook/contribute/git/#unit-tests

This check should presumably only be run when WP_RUN_CORE_TESTS is defined.

Change History (5)

#1 @bjorsch
4 hours ago

  • Summary changed from Plugin phpunit testing is broken to Plugin phpunit integration testing (following documented instructions) is broken

#2 in reply to: ↑ description @SergeyBiryukov
4 hours ago

  • Milestone changed from Awaiting Review to 6.7

Replying to bjorsch:

This check should presumably only be run when WP_RUN_CORE_TESTS is defined.

Indeed, thanks!

#3 @SergeyBiryukov
4 hours ago

  • Description modified (diff)
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#4 @SergeyBiryukov
4 hours ago

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

In 59086:

Build/Test Tools: Only require the WordPress Importer plugin when running core tests.

This allows other users of the WordPress unit test suite framework to run their own unit tests without needing the WordPress Importer plugin, which should only be a requirement if running core tests.

Follow-up to [59085].

Props bjorsch.
Fixes #62106.

#5 @bjorsch
4 hours ago

Confirmed our plugin integration tests are working again. Thanks for the quick fix!

Note: See TracTickets for help on using tickets.