Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46593 closed defect (bug) (fixed)

Fatal error when running unit tests without the build directory

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


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 5 years ago.

Download all attachments as: .zip

Change History (3)

5 years ago

#1 @davidbaumwald
5 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
5 years 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.