diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-23 00:56:34 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-23 00:56:34 +0400 |
commit | d3acd98e38af19fda9f4e46d064ad6664e9330da (patch) | |
tree | 43947ae2338bceac6b75b43f38af0dc2556debc1 /core | |
parent | 9acb07c5c971489b497db9f1bf2d538a42a48233 (diff) |
Modified tests to allow testing login & password reset functionality:
- Modify test user adding logic to hash password instead of using pre-hashed password.
- Allow testing environment to be configured via Option values that start w/ 'Tests.'.
- Put a couple test classes into namespaces. Add test event to Piwik\Mail class so emails can be intercepted.
- Change some test logging level to INFO.
- Added load + reload methods to PageFacade in capture.js
Diffstat (limited to 'core')
-rw-r--r-- | core/Mail.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Mail.php b/core/Mail.php index bbd8255e93..09a3936a36 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -80,4 +80,13 @@ class Mail extends Zend_Mail Mail::setDefaultTransport($tr); ini_set("smtp_port", $mailConfig['port']); } + + public function send($transport = NULL) + { + if (defined('PIWIK_TEST_MODE')) { // hack + Piwik::postTestEvent("Test.Mail.send", array($this)); + } else { + return parent::send($transport); + } + } } |