Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#46593 closed defect (bug) (fixed)

Fatal error when running unit tests without the build directory

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

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

Download all attachments as: .zip

Change History (3)

@davidbaumwald
7 years ago

#1 @davidbaumwald
7 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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.