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