Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Dec 2008 at 00:03 UTC
Updated:
21 Dec 2008 at 08:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidPatch provided for review.
Comment #2
dave reidBah, forgot to set as code needs review. I suck.
Comment #3
dave reidA side note on this, the default value for site_mail is ini_get('sendmail_from'), which is empty on my default Ubuntu 8.04-PHP install.
Comment #4
Anonymous (not verified) commentedlooks good to me. bumping this to critical, as it will break (at least) anything that tries to test admin/settings/site-information.
Comment #5
damien tournoud commentedIf you need it, simply set it in the setUp() method of your test. That's clearly not a bug in Simpletest, as we don't have that approach for any other variable.
Comment #6
dave reidHmm...I just think it's wrong that SimpleTest is running all these tests without a valid site_mail variable since my ini_set('sendmail_from') is empty. All the other required site variables have "normal" default strings.
Comment #7
Anonymous (not verified) commented@Damien: not sure i agree with this. i would have thought the organising idea for a test environment would be that it would match a default drupal install + some test modules.
maybe you could explain why its ok to have a test drupal install that doesn't set site_mail?
Comment #8
chx commentedMeh, a variable_set cant hurt and it is quite rational to presume that parts of Drupal will except site_mail to be set. (it's high time we provide a write-mails-to-files lib as part of simpletest. followup issue)
Comment #9
webchickI agree that this seems sensible to me. Special-casing this in every test that needs it (or the form it's set in) seems like an exercise in frustration. In theory, the installer should not be letting us continue without that value set though. Hm.
Anyway, committed to HEAD.