HummingBirdAnimeClient/tests/AnimeClient/bootstrap.php
Timothy J Warren 52fc6d8391
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
Move AnimeClient tests
2020-03-11 23:18:31 -04:00

41 lines
1.2 KiB
PHP

<?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
// -----------------------------------------------------------------------------
require_once __DIR__ . '/AnimeClientTestCase.php';
require_once __DIR__ . '/../vendor/autoload.php';
// -----------------------------------------------------------------------------
// Ini Settings
// -----------------------------------------------------------------------------
ini_set('session.use_cookies', 0);
ini_set("session.use_only_cookies", 0);
ini_set("session.use_trans_sid", 1);
// Start session here to supress error about headers not sent
session_start();
// -----------------------------------------------------------------------------
// Load base test case and mocks
// -----------------------------------------------------------------------------
// Pre-define some superglobals
$_SESSION = [];
$_COOKIE = [];
// Request base test case and mocks
require_once __DIR__ . '/TestSessionHandler.php';
require_once __DIR__ . '/mocks.php';
// End of bootstrap.php