function ProfileAutoUninstallFailureTest::setUpSite

Same name and namespace in other branches
  1. main core/tests/Drupal/FunctionalTests/Installer/ProfileAutoUninstallFailureTest.php \Drupal\FunctionalTests\Installer\ProfileAutoUninstallFailureTest::setUpSite()

Final installer step: Configure site.

Overrides InstallerTestBase::setUpSite

File

core/tests/Drupal/FunctionalTests/Installer/ProfileAutoUninstallFailureTest.php, line 30

Class

ProfileAutoUninstallFailureTest
Tests that profile-provided dependencies thwart auto-uninstall.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function setUpSite() : void {
  try {
    parent::setUpSite();
    $this->fail('Expected an exception due to an in-use dependency.');
  } catch (\Throwable $e) {
    $this->assertStringContainsString("The install profile 'Testing - Automatic uninstall failure' is providing the following module(s): testing_in_use_dependency", $e->getMessage());
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.