silverstripe-testsession/_config.php

19 lines
434 B
PHP
Raw Normal View History

<?php
if(
Config::inst()->get('Security', 'token')
&& DB::get_alternative_database_name()
) {
require_once BASE_PATH . '/vendor/autoload.php';
// Register mailer
2012-12-19 15:47:39 +01:00
if($mailer = Session::get('testsession.mailer')) {
Email::set_mailer(new $mailer());
Email::send_all_emails_to(null);
}
// Set mock date and time
2012-12-19 15:47:39 +01:00
$date = Session::get('testsession.date');
if($date) {
SS_Datetime::set_mock_now($date);
}
}