You are here

public function ForumUninstallValidatorTest::testValidateNotForum in Zircon Profile 8.0

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

@covers ::validate

File

core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php, line 41
Contains \Drupal\Tests\forum\Unit\ForumUninstallValidatorTest.

Class

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

Namespace

Drupal\Tests\forum\Unit

Code

public function testValidateNotForum() {
  $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
    ->assertSame($expected, $this
    ->castSafeStrings($reasons));
}