class ProfileAutoUninstallFailureTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/ProfileAutoUninstallFailureTest.php \Drupal\FunctionalTests\Installer\ProfileAutoUninstallFailureTest
Tests that profile-provided dependencies thwart auto-uninstall.
Attributes
#[Group('Installer')]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\FunctionalTests\Installer\ProfileAutoUninstallFailureTest extends \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of ProfileAutoUninstallFailureTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ ProfileAutoUninstallFailureTest.php, line 13
Namespace
Drupal\FunctionalTests\InstallerView source
class ProfileAutoUninstallFailureTest extends InstallerTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'testing_auto_uninstall_has_dependencies';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
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());
}
}
/**
* Tests that the profile cannot be automatically uninstalled.
*/
public function testAutomaticUninstallFailure() : void {
// Everything we're testing here happens in setUpSite().
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.