WordPress.org

Make WordPress Core

#46593 closed defect (bug) (fixed)

Fatal error when running unit tests without the build directory

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.2 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

If you create a new checkout and attempt to run PHPUnit without running grunt build first, you'll get a fatal error:

Fatal error: require_once(): Failed opening required 'build//wp-includes/class-phpmailer.php' in tests/phpunit/includes/mock-mailer.php on line 2

There should be a proper error message with a recommendation to run grunt build.

Attachments (1)

46593.diff (717 bytes) - added by davidbaumwald 14 months ago.

Download all attachments as: .zip

Change History (3)

#1 @davidbaumwald
14 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
14 months ago

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

In 45020:

Build/Test Tools: Display an error message with a recommendation to run grunt build when trying to run WordPress core tests without the /build/ directory.

Props davidbaumwald.
Fixes #46593.

Note: See TracTickets for help on using tickets.