Opened 11 years ago
Closed 11 years ago
#32702 closed defect (bug) (fixed)
Unit tests should set `$_SERVER['SERVER_NAME']` for `wp_mail()`
| Reported by: | boonebgorges | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Version: | ||
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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].
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 32839: