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

@ -7,7 +7,7 @@ use MailPoet\Models\Model as MPModel;
use MailPoetVendor\Idiorm\ORM;
class ModelTest extends \MailPoetTest {
function testItRethrowsPDOExceptions() {
public function testItRethrowsPDOExceptions() {
$message = 'Error message';
$model = Stub::make('MailPoet\Models\Model');
$pdo = Stub::make(
@ -28,7 +28,7 @@ class ModelTest extends \MailPoetTest {
}
}
function testItConvertsModelObjectToArray() {
public function testItConvertsModelObjectToArray() {
$model = MPModel::create();
$model->first = 'first';
$model->last = 'last';
@ -45,28 +45,28 @@ class ModelTest extends \MailPoetTest {
);
}
function testSetErrorsWithoutCode() {
public function testSetErrorsWithoutCode() {
$model = MPModel::create();
$model->setError('error1');
$model->setError('error2');
expect($model->getErrors())->equals(['error1', 'error2']);
}
function testSetErrorsAsArray() {
public function testSetErrorsAsArray() {
$model = MPModel::create();
$model->setError(['error1']);
$model->setError(['error2', 'error1']);
expect($model->getErrors())->equals(['error1', 'error2']);
}
function testSetErrorsWithCode() {
public function testSetErrorsWithCode() {
$model = MPModel::create();
$model->setError('error1');
$model->setError('error2', 5);
expect($model->getErrors())->equals(['error1', 5 => 'error2']);
}
function testSetErrorCodeForDuplicateRecords() {
public function testSetErrorCodeForDuplicateRecords() {
$orm = Stub::makeEmpty(
ORM::class,
[
@ -85,7 +85,7 @@ class ModelTest extends \MailPoetTest {
expect($errors[MPModel::DUPLICATE_RECORD])->contains('Please specify a different "name".');
}
function _after() {
public function _after() {
ORM::setDb($this->connection->getWrappedConnection());
}
}