Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -12,7 +12,7 @@ class PHPMailMapperTest extends \MailPoetUnitTest {
|
||||
/** @var PHPMailMapper*/
|
||||
private $mapper;
|
||||
|
||||
function _before() {
|
||||
public function _before() {
|
||||
parent::_before();
|
||||
$this->mapper = new PHPMailMapper();
|
||||
WPFunctions::set(Stub::make(new WPFunctions, [
|
||||
@ -22,26 +22,26 @@ class PHPMailMapperTest extends \MailPoetUnitTest {
|
||||
]));
|
||||
}
|
||||
|
||||
function testGetProperErrorForSubscriber() {
|
||||
public function testGetProperErrorForSubscriber() {
|
||||
$error = $this->mapper->getErrorForSubscriber('john@rambo.com');
|
||||
expect($error->getLevel())->equals(MailerError::LEVEL_HARD);
|
||||
expect($error->getMessage())->equals('PHPMail has returned an unknown error.');
|
||||
expect($error->getSubscriberErrors()[0]->getEmail())->equals('john@rambo.com');
|
||||
}
|
||||
|
||||
function testGetProperErrorFromException() {
|
||||
public function testGetProperErrorFromException() {
|
||||
$error = $this->mapper->getErrorFromException(new \Exception('Some message'), 'john@rambo.com');
|
||||
expect($error->getLevel())->equals(MailerError::LEVEL_HARD);
|
||||
expect($error->getMessage())->equals('Some message');
|
||||
expect($error->getSubscriberErrors()[0]->getEmail())->equals('john@rambo.com');
|
||||
}
|
||||
|
||||
function testGetSoftErrorFromExceptionForInvalidEmail() {
|
||||
public function testGetSoftErrorFromExceptionForInvalidEmail() {
|
||||
$error = $this->mapper->getErrorFromException(new \Exception('Invalid address. (Add ...'), 'john@rambo.com');
|
||||
expect($error->getLevel())->equals(MailerError::LEVEL_SOFT);
|
||||
}
|
||||
|
||||
function _after() {
|
||||
public function _after() {
|
||||
WPFunctions::set(new WPFunctions);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user