You are here

public function InstallProfileTest::testEnabledModuleInProfile in Helper 8

Tests switching from a profile which has an enabled module inside it.

@covers ::validateProfile @covers ::checkEnabledProfileExtensions

File

tests/src/Kernel/InstallProfileTest.php, line 109

Class

InstallProfileTest
Tests the install profile helper.

Namespace

Drupal\Tests\helper\Kernel

Code

public function testEnabledModuleInProfile() {
  $this
    ->enableModules([
    'drupal_system_cross_profile_test',
    'drupal_system_listing_compatible_test',
  ]);
  $this
    ->expectException(InstallerException::class);
  $this
    ->expectExceptionMessage("The following modules are located inside the current testing profile and may not be available when switching to the minimal profile: drupal_system_cross_profile_test, drupal_system_listing_compatible_test.");
  $this->installProfile
    ->validateProfile('minimal');
}