public function SMTPMailSystemTest::testGetComponents in SMTP Authentication Support 8
Test getComponents().
@dataProvider getComponentsProvider
File
- tests/
src/ Unit/ Plugin/ Mail/ SMTPMailSystemTest.php, line 138
Class
- SMTPMailSystemTest
- Validate requirements for SMTPMailSystem.
Namespace
Drupal\Tests\smtp\Unit\Plugin\MailCode
public function testGetComponents($input, $expected) {
$mailSystem = new SMTPMailSystemTestHelper([], '', [], $this->mockLogger
->reveal(), $this->mockMessenger
->reveal(), $this->emailValidator, $this->mockConfigFactory, $this->mockCurrentUser
->reveal(), $this->mockFileSystem
->reveal(), $this->mimeTypeGuesser
->reveal());
$ret = $mailSystem
->publicGetComponents($input);
if (!empty($expected['input'])) {
$this
->assertEquals($expected['input'], $ret['input']);
}
else {
$this
->assertEquals($input, $ret['input']);
}
$this
->assertEquals($expected['name'], $ret['name']);
$this
->assertEquals($expected['email'], $ret['email']);
}