3 namespace Drupal\Core\Test;
5 use Drupal\Core\DrupalKernel;
8 * Kernel to mock requests to test simpletest.
10 class TestKernel extends DrupalKernel {
15 public function __construct($environment, $class_loader, $allow_dumping = TRUE) {
16 // Include our bootstrap file.
17 require_once __DIR__ . '/../../../../includes/bootstrap.inc';
19 // Exit if we should be in a test environment but aren't.
20 if (!drupal_valid_test_ua()) {
21 header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
25 parent::__construct($environment, $class_loader, $allow_dumping);