2015-06-25 17:00:29 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Global setup for unit tests
|
|
|
|
*/
|
2016-01-06 15:44:40 -05:00
|
|
|
|
2016-07-18 13:06:37 -04:00
|
|
|
// Work around the silly timezone error
|
|
|
|
$timezone = ini_get('date.timezone');
|
|
|
|
if ($timezone === '' || $timezone === FALSE)
|
|
|
|
{
|
|
|
|
ini_set('date.timezone', 'GMT');
|
|
|
|
}
|
|
|
|
|
2016-01-06 15:44:40 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Autoloading
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2018-01-16 14:58:07 -05:00
|
|
|
require_once __DIR__ . '/AnimeClientTestCase.php';
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
2015-09-14 10:54:50 -04:00
|
|
|
|
2015-10-09 14:34:55 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2015-10-19 12:50:46 -04:00
|
|
|
// Ini Settings
|
2015-10-09 14:34:55 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2015-10-19 12:50:46 -04:00
|
|
|
ini_set('session.use_cookies', 0);
|
2017-02-15 11:49:38 -05:00
|
|
|
ini_set("session.use_only_cookies", 0);
|
|
|
|
ini_set("session.use_trans_sid", 1);
|
2015-10-19 12:50:46 -04:00
|
|
|
// Start session here to supress error about headers not sent
|
2016-01-06 15:44:40 -05:00
|
|
|
session_start();
|
2015-10-09 14:34:55 -04:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2015-10-19 12:50:46 -04:00
|
|
|
// Load base test case and mocks
|
2015-10-09 14:34:55 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2015-10-19 12:50:46 -04:00
|
|
|
// Pre-define some superglobals
|
|
|
|
$_SESSION = [];
|
|
|
|
$_COOKIE = [];
|
2015-10-09 14:34:55 -04:00
|
|
|
|
2015-10-19 12:50:46 -04:00
|
|
|
// Request base test case and mocks
|
2018-01-16 14:58:07 -05:00
|
|
|
require_once __DIR__ . '/TestSessionHandler.php';
|
|
|
|
require_once __DIR__ . '/mocks.php';
|
2015-10-09 14:34:55 -04:00
|
|
|
|
|
|
|
// End of bootstrap.php
|