You are here

protected function ForumUninstallValidatorTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php, line 22

Class

ForumUninstallValidatorTest
@coversDefaultClass \Drupal\forum\ForumUninstallValidator @group forum

Namespace

Drupal\Tests\forum\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->forumUninstallValidator = $this
    ->getMockBuilder('Drupal\\forum\\ForumUninstallValidator')
    ->disableOriginalConstructor()
    ->setMethods([
    'hasForumNodes',
    'hasTermsForVocabulary',
    'getForumVocabulary',
  ])
    ->getMock();
  $this->forumUninstallValidator
    ->setStringTranslation($this
    ->getStringTranslationStub());
}