function RequiredModuleUninstallValidatorTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php \Drupal\Tests\Core\Extension\RequiredModuleUninstallValidatorTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php, line 23

Class

RequiredModuleUninstallValidatorTest
@coversDefaultClass \Drupal\Core\Extension\RequiredModuleUninstallValidator @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

protected function setUp() : void {
    parent::setUp();
    $this->uninstallValidator = $this->getMockBuilder('Drupal\\Core\\Extension\\RequiredModuleUninstallValidator')
        ->disableOriginalConstructor()
        ->onlyMethods([
        'getModuleInfoByModule',
    ])
        ->getMock();
    $this->uninstallValidator
        ->setStringTranslation($this->getStringTranslationStub());
}

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