Skip to content
Snippets Groups Projects
Unverified Commit 2c1c25a4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3038825 by undertext, Mile23: Remove unused code from KernelTestBase

parent 2f162aca
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -331,17 +331,6 @@ private function bootKernel() {
$modules = self::getModulesToEnable(get_class($this));
// Prepare a precompiled container for all tests of this class.
// Substantially improves performance, since ContainerBuilder::compile()
// is very expensive. Encourages testing best practices (small tests).
// Normally a setUpBeforeClass() operation, but object scope is required to
// inject $this test class instance as a service provider (see above).
$rc = new \ReflectionClass(get_class($this));
$test_method_count = count(array_filter($rc->getMethods(), function ($method) {
// PHPUnit's @test annotations are intentionally ignored/not supported.
return strpos($method->getName(), 'test') === 0;
}));
// Bootstrap the kernel. Do not use createFromRequest() to retain Settings.
$kernel = new DrupalKernel('testing', $this->classLoader, FALSE);
$kernel->setSitePath($this->siteDirectory);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment