Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -14,7 +14,7 @@ class SMTPMapperTest extends \MailPoetUnitTest {
|
||||
/** @var SMTPMapper */
|
||||
private $mapper;
|
||||
|
||||
function _before() {
|
||||
public function _before() {
|
||||
parent::_before();
|
||||
$this->mapper = new SMTPMapper();
|
||||
WPFunctions::set(Stub::make(new WPFunctions, [
|
||||
@ -24,7 +24,7 @@ class SMTPMapperTest extends \MailPoetUnitTest {
|
||||
]));
|
||||
}
|
||||
|
||||
function testItCanProcessExceptionMessage() {
|
||||
public function testItCanProcessExceptionMessage() {
|
||||
$message = 'Connection could not be established with host localhost [Connection refused #111]' . PHP_EOL
|
||||
. 'Log data:' . PHP_EOL
|
||||
. '++ Starting Swift_SmtpTransport' . PHP_EOL
|
||||
@ -36,13 +36,13 @@ class SMTPMapperTest extends \MailPoetUnitTest {
|
||||
expect($error->getSubscriberErrors()[0]->getEmail())->equals('john@rambo.com');
|
||||
}
|
||||
|
||||
function testItCreatesSoftErrorForInvalidEmail() {
|
||||
public function testItCreatesSoftErrorForInvalidEmail() {
|
||||
$message = 'Invalid email';
|
||||
$error = $this->mapper->getErrorFromException(new Swift_RfcComplianceException($message), 'john@rambo.com');
|
||||
expect($error->getLevel())->equals(MailerError::LEVEL_SOFT);
|
||||
}
|
||||
|
||||
function testItCanProcessLogMessageWhenOneExists() {
|
||||
public function testItCanProcessLogMessageWhenOneExists() {
|
||||
$log = '++ Swift_SmtpTransport started' . PHP_EOL
|
||||
. '>> MAIL FROM:<moi@mrcasual.com>' . PHP_EOL
|
||||
. '<< 250 OK' . PHP_EOL
|
||||
@ -58,14 +58,14 @@ class SMTPMapperTest extends \MailPoetUnitTest {
|
||||
expect($error->getSubscriberErrors()[0]->getEmail('moi@mrcasual.com'));
|
||||
}
|
||||
|
||||
function testItReturnsGenericMessageWhenLogMessageDoesNotExist() {
|
||||
public function testItReturnsGenericMessageWhenLogMessageDoesNotExist() {
|
||||
$error = $this->mapper->getErrorFromLog(null, 'test@example.com');
|
||||
expect($error->getMessage())
|
||||
->equals(Mailer::METHOD_SMTP . ' has returned an unknown error.');
|
||||
expect($error->getSubscriberErrors()[0]->getEmail('moi@mrcasual.com'));
|
||||
}
|
||||
|
||||
function _after() {
|
||||
public function _after() {
|
||||
WPFunctions::set(new WPFunctions);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user