function ForumUninstallValidatorTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::setUp()
  2. 8.9.x core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::setUp()
  3. 11.x 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 25

Class

ForumUninstallValidatorTest
@coversDefaultClass \Drupal\forum\ForumUninstallValidator[[api-linebreak]] @group forum @group legacy

Namespace

Drupal\Tests\forum\Unit

Code

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

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