mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
16 lines
384 B
PHP
16 lines
384 B
PHP
<?php
|
|
if(DB::get_alternative_database_name()) {
|
|
require_once BASE_PATH . '/vendor/autoload.php';
|
|
|
|
// Register mailer
|
|
if($mailer = Session::get('testsession.mailer')) {
|
|
Email::set_mailer(new $mailer());
|
|
Email::send_all_emails_to(null);
|
|
}
|
|
|
|
// Set mock date and time
|
|
$date = Session::get('testsession.date');
|
|
if($date) {
|
|
SS_Datetime::set_mock_now($date);
|
|
}
|
|
} |