silverstripe-framework/tests/bootstrap/phpunit.php
Damian Mooyman 0c41a97a8b API Refactor Form request handling into FormRequestHandler
API Add HasRequestHandler interface
API Refactor Link() and url handling behaviour from Controller into RequestHandler
API RequestHandler classes now must define url_segment to have a default Link()
API Clean up redirectBack()
2017-03-10 15:04:33 +13:00

22 lines
453 B
PHP

<?php
// Bootstrap for running SapphireTests
// Connect to database
use SilverStripe\ORM\DB;
require_once __DIR__ . '/../../src/Core/Core.php';
require_once __DIR__ . '/../php/Control/FakeController.php';
global $databaseConfig;
DB::connect($databaseConfig);
// Now set a fake REQUEST_URI
$_SERVER['REQUEST_URI'] = BASE_URL;
// Fake a session
$_SESSION = null;
// Remove the error handler so that PHPUnit can add its own
restore_error_handler();