You are here

public function AmazonSesSettingsFormTest::testInvalidFromAddress in Amazon SES 2.0.x

Tests that an invalid email address shows an error.

File

tests/src/Functional/AmazonSesSettingsFormTest.php, line 80

Class

AmazonSesSettingsFormTest
Tests the Amazon SES settings form.

Code

public function testInvalidFromAddress() {
  $this
    ->drupalGet(Url::fromRoute('amazon_ses.settings_form'));
  $this
    ->getSession()
    ->getPage()
    ->fillField('from_address', 'test');
  $this
    ->getSession()
    ->getPage()
    ->pressButton($this
    ->t('Save configuration'));
  $this
    ->assertSession()
    ->pageTextContains('The email address test is not valid.');
}