protected $forumUninstallValidator;
/**
* {@inheritdoc}
*/
protected function setUp(): void
{ parent::
setUp();
$this->forumUninstallValidator =
$this->
getMockBuilder('Drupal\forum\ForumUninstallValidator'
) ->
disableOriginalConstructor() ->
onlyMethods(['hasForumNodes', 'hasTermsForVocabulary', 'getForumVocabulary'
]) ->
getMock();
$this->forumUninstallValidator->
setStringTranslation($this->
getStringTranslationStub());
} /**
* @covers ::validate
*/
public function testValidateNotForum() { $this->forumUninstallValidator->
expects($this->
never()) ->
method('hasForumNodes'
);
$this->forumUninstallValidator->
expects($this->
never()) ->
method('hasTermsForVocabulary'
);
$this->forumUninstallValidator->
expects($this->
never())