function ForumUninstallValidatorTest::testValidate
Same name in other branches
- 9 core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::testValidate()
- 8.9.x core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::testValidate()
- 11.x core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest::testValidate()
@covers ::validate
File
-
core/
modules/ forum/ tests/ src/ Unit/ ForumUninstallValidatorTest.php, line 54
Class
- ForumUninstallValidatorTest
- @coversDefaultClass \Drupal\forum\ForumUninstallValidator @group forum @group legacy
Namespace
Drupal\Tests\forum\UnitCode
public function testValidate() : void {
$this->forumUninstallValidator
->expects($this->once())
->method('hasForumNodes')
->willReturn(FALSE);
$vocabulary = $this->createMock('Drupal\\taxonomy\\VocabularyInterface');
$this->forumUninstallValidator
->expects($this->once())
->method('getForumVocabulary')
->willReturn($vocabulary);
$this->forumUninstallValidator
->expects($this->once())
->method('hasTermsForVocabulary')
->willReturn(FALSE);
$module = '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.