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

merge-requests/1119/head
Alex Pott 2019-04-02 16:01:26 +01:00
parent 2f162acaae
commit 2c1c25a40d
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 0 additions and 11 deletions

View File

@ -331,17 +331,6 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa
$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);