예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function __construct($environment, ClassLoader $class_loader)
 {
     parent::__construct($environment, $class_loader, FALSE);
     // Prime the module list and corresponding Extension objects.
     // @todo Remove System module. Needed because \Drupal\Core\Datetime\Date
     //   has a (needless) dependency on the 'date_format' entity, so calls to
     //   format_date()/format_interval() cause a plugin not found exception.
     $this->moduleList = array('system' => 0, 'simpletest' => 0);
     $this->moduleData = array('system' => new Extension('module', 'core/modules/system/system.info.yml', 'system.module'), 'simpletest' => new Extension('module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'));
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct($environment, $class_loader, $allow_dumping = TRUE)
 {
     // Include our bootstrap file.
     require_once __DIR__ . '/../../../../includes/bootstrap.inc';
     // 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);
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function __construct($environment, $class_loader, $allow_dumping = FALSE, $app_root = NULL)
 {
     // Force $allow_dumping to FALSE, because the test runner kernel should
     // always have to rebuild its container, and potentially avoid isolation
     // issues against the tests.
     parent::__construct($environment, $class_loader, FALSE, $app_root);
     // Prime the module list and corresponding Extension objects.
     // @todo Remove System module. Needed because
     //   \Drupal\Core\Datetime\DateFormatter has a (needless) dependency on the
     //   'date_format' entity, so calls to format_date()/format_interval() cause
     //   a plugin not found exception.
     $this->moduleList = array('system' => 0, 'simpletest' => 0);
     $this->moduleData = array('system' => new Extension($this->root, 'module', 'core/modules/system/system.info.yml', 'system.module'), 'simpletest' => new Extension($this->root, 'module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'));
 }
 /**
  * TestDrupalKernel constructor.
  */
 public function __construct($env, $class_loader, $root)
 {
     $this->root = $root;
     parent::__construct($env, $class_loader);
 }