Add public keyword to methods

[MAILPOET-2413]
This commit is contained in:
Amine Ben hammou
2019-12-26 12:56:49 +01:00
committed by wxa
parent ec409042d5
commit 43df66d162
823 changed files with 4440 additions and 4440 deletions

View File

@ -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);
}
}