function ForumUninstallValidatorTest::testValidateNotForum
@covers ::validate
File
-
core/
modules/ forum/ tests/ src/ Unit/ ForumUninstallValidatorTest.php, line 37
Class
- ForumUninstallValidatorTest
- @coversDefaultClass \Drupal\forum\ForumUninstallValidator[[api-linebreak]] @group forum @group legacy
Namespace
Drupal\Tests\forum\UnitCode
public function testValidateNotForum() : void {
$this->forumUninstallValidator
->expects($this->never())
->method('hasForumNodes');
$this->forumUninstallValidator
->expects($this->never())
->method('hasTermsForVocabulary');
$this->forumUninstallValidator
->expects($this->never())
->method('getForumVocabulary');
$module = 'not_forum';
$expected = [];
$reasons = $this->forumUninstallValidator
->validate($module);
$this->assertEquals($expected, $reasons);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.