ExampleMailTest.php in Swift Mailer 8.2
File
tests/src/Functional/ExampleMailTest.php
View source
<?php
namespace Drupal\Tests\swiftmailer\Functional;
use Drupal\Core\Url;
class ExampleMailTest extends SwiftMailerTestBase {
public function testForm() {
$account = $this
->createUser([
'administer swiftmailer',
]);
$this
->drupalLogin($account);
$this
->drupalGet(Url::fromRoute('swiftmailer.test'));
$this
->submitForm([], 'Send');
$this
->assertSession()
->pageTextContains(t('An attempt has been made to send an e-mail to @email.', [
'@email' => $account
->getEmail(),
]));
$this
->assertBodyContains('The module has been successfully configured.');
}
}