From d3acd98e38af19fda9f4e46d064ad6664e9330da Mon Sep 17 00:00:00 2001 From: diosmosis Date: Sat, 22 Feb 2014 20:56:34 +0000 Subject: 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 --- core/Mail.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/Mail.php') 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); + } + } } -- cgit v1.2.3