pickles/tests/bootstrap.php
Joshua Sherman 8db383601e More tests and 100% coverage achievements!
Also fixed a few minor bugs and reworked Browser class to not use the constant
UNIT_TESTING so I could get the class to 100% coverage. Adds a dependency of
testing_helpers which I believe is available on Travis CI by default. Up to 75%
coverage, w00t w00t!
2014-01-12 16:09:48 -05:00

45 lines
864 B
PHP

<?php
set_exit_overload(function(){ return false; });
ob_start();
@session_start();
require_once 'vendors/composer/autoload.php';
$root = org\bovigo\vfs\vfsStream::setup('site');
if (!defined('SITE_PATH'))
{
define('SECURITY_LEVEL_USER', 10);
define('SITE_PATH', org\bovigo\vfs\vfsStream::url('site/'));
}
require_once 'pickles.php';
if (!file_exists(SITE_MODULE_PATH))
{
mkdir(SITE_MODULE_PATH, 0644);
}
if (!file_exists(SITE_TEMPLATE_PATH))
{
mkdir(SITE_TEMPLATE_PATH, 0644);
}
if (!file_exists(SITE_TEMPLATE_PATH . '__shared/'))
{
mkdir(SITE_TEMPLATE_PATH . '__shared/', 0644);
}
$_SERVER['HTTP_HOST'] = 'testsite.com';
$_SERVER['SERVER_NAME'] = 'Test Server';
function setUpRequest($request, $method = 'GET')
{
$_SERVER['REQUEST_URI'] = '/' . $request;
$_SERVER['REQUEST_METHOD'] = $method;
$_REQUEST['request'] = $request;
}
?>