Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TestKernel.php

function TestKernel::__construct

Overrides DrupalKernel::__construct

File

core/lib/Drupal/Core/Test/TestKernel.php, line 17

Class

TestKernel
Kernel that is only used by mock front controllers.

Namespace

Drupal\Core\Test

Code

public function __construct($environment, $class_loader, $allow_dumping = TRUE) {
    // Exit if we should be in a test environment but aren't.
    if (!drupal_valid_test_ua()) {
        header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
        exit;
    }
    parent::__construct($environment, $class_loader, $allow_dumping);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal