2016-08-04 14:55:37 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Global setup for unit tests
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Work around the silly timezone error
|
|
|
|
$timezone = ini_get('date.timezone');
|
|
|
|
if ($timezone === '' || $timezone === FALSE)
|
|
|
|
{
|
|
|
|
ini_set('date.timezone', 'GMT');
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Autoloading
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Composer autoload
|
2017-03-24 16:57:27 -04:00
|
|
|
require realpath(__DIR__ . '/../vendor/autoload.php');
|
|
|
|
require 'Ion_TestCase.php';
|
2016-08-04 14:55:37 -04:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Ini Settings
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
ini_set('session.use_cookies', 0);
|
2019-12-05 16:20:10 -05:00
|
|
|
ini_set('session.use_only_cookies',0);
|
|
|
|
ini_set('session.use_trans_sid',1);
|
2016-08-26 17:21:50 -04:00
|
|
|
// Start session here to surpress error about headers not sent
|
2016-08-04 14:55:37 -04:00
|
|
|
session_start();
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Load base test case and mocks
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Pre-define some superglobals
|
|
|
|
$_SESSION = [];
|
|
|
|
$_COOKIE = [];
|
|
|
|
|
|
|
|
// Request base test case and mocks
|
|
|
|
require 'TestSessionHandler.php';
|
|
|
|
require 'mocks.php';
|
|
|
|
|
|
|
|
// End of bootstrap.php
|