function RequiredModuleUninstallValidatorTest::testValidateNotRequired
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::testValidateNotRequired()
- 10 core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::testValidateNotRequired()
- 11.x core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::testValidateNotRequired()
@covers ::validate
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ RequiredModuleUninstallValidatorTest.php, line 47
Class
- RequiredModuleUninstallValidatorTest
- @coversDefaultClass \Drupal\Core\Extension\RequiredModuleUninstallValidator @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
public function testValidateNotRequired() {
$module = $this->randomMachineName();
$this->uninstallValidator
->expects($this->once())
->method('getModuleInfoByModule')
->willReturn([
'required' => FALSE,
'name' => $module,
]);
$expected = [];
$reasons = $this->uninstallValidator
->validate($module);
$this->assertSame($expected, $reasons);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.