Opened 9 years ago
Closed 9 years ago
#32702 closed defect (bug) (fixed)
Unit tests should set `$_SERVER['SERVER_NAME']` for `wp_mail()`
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Keywords: | ||
Focuses: | Cc: |
Description
When a test calls wp_mail()
(directly or indirectly), and when that call to wp_mail()
doesn't include an explicit From header, wp_mail()
attempts to concatenate a From email out of $_SERVER['SERVER_NAME']
. But when running PHPUnit, this variable is not set. Ideally, we'd only fake the SERVER_NAME when wp_mail()
requires it, though I don't think there'd be any harm in faking it for every test (it's only used in WP when sending mail).
The tests specific to wp_mail()
already do this.
See [32820].
Change History (1)
Note: See
TracTickets for help on using
tickets.
In 32839: