Skip to content
Snippets Groups Projects
Commit 80ee826c authored by catch's avatar catch
Browse files

Issue #2945306 by alexpott, dawehner: The new ModuleList in 8.6.x can discover...

Issue #2945306 by alexpott, dawehner: The new ModuleList in 8.6.x can discover modules in tests the previous code could not
parent 4f1df3fb
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
...@@ -135,6 +135,9 @@ function install_drupal($class_loader, $settings = []) { ...@@ -135,6 +135,9 @@ function install_drupal($class_loader, $settings = []) {
$state = $install_state; $state = $install_state;
if (!empty($install_state['installation_finished'])) { if (!empty($install_state['installation_finished'])) {
unset($GLOBALS['install_state']); unset($GLOBALS['install_state']);
// If installation is finished ensure any further container rebuilds do not
// use the installer's service provider.
unset($GLOBALS['conf']['container_service_providers']['InstallerServiceProvider']);
} }
// All available tasks for this page request are now complete. Interactive // All available tasks for this page request are now complete. Interactive
......
...@@ -639,4 +639,13 @@ public function testGetDefaultDriveInstance() { ...@@ -639,4 +639,13 @@ public function testGetDefaultDriveInstance() {
$this->assertEquals([NULL, ['key1' => ['key2' => ['key3' => 3, 'key3.1' => 3.1]]]], $this->minkDefaultDriverArgs); $this->assertEquals([NULL, ['key1' => ['key2' => ['key3' => 3, 'key3.1' => 3.1]]]], $this->minkDefaultDriverArgs);
} }
/**
* Ensures we can't access modules we shouldn't be able to after install.
*/
public function testProfileModules() {
$this->setExpectedException(\InvalidArgumentException::class, 'The module demo_umami_content does not exist.');
$this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
\Drupal::service('extension.list.module')->getPathname('demo_umami_content');
}
} }
...@@ -306,4 +306,15 @@ protected function tearDown() { ...@@ -306,4 +306,15 @@ protected function tearDown() {
} }
} }
/**
* Ensures KernelTestBase tests can access modules in profiles.
*/
public function testProfileModules() {
$this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
$this->assertSame(
'core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml',
\Drupal::service('extension.list.module')->getPathname('demo_umami_content')
);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment