public function SMTPConfigFormTest::testBuildFormDisabledMessage in SMTP Authentication Support 8
Test if enabled message is properly shown.
File
- tests/src/ Unit/ SMTPConfigFormTest.php, line 102 
Class
- SMTPConfigFormTest
- Validate requirements for SMTPConfigForm.
Namespace
Drupal\Tests\smtp\UnitCode
public function testBuildFormDisabledMessage() {
  $this
    ->setDefaultConfig();
  $this->mockConfig
    ->get('smtp_on')
    ->willReturn(FALSE);
  $formBuilder = SMTPConfigForm::create($this->mockContainer
    ->reveal());
  $form = [];
  $formBuilder
    ->buildForm($form, new FormState());
  $this->mockMessenger
    ->addMessage(Argument::which('getUntranslatedString', 'SMTP module is INACTIVE.'))
    ->shouldHaveBeenCalled();
}